)]}'
{
  "commit": "e7327c193014a4d8666e9c1cda09cf2c060518e8",
  "tree": "c0702469a4eba72d31c1e4fe5c8378d97929720c",
  "parents": [
    "7ca59947b5fcf94e7ea4029d1bd0f7c41500a161"
  ],
  "author": {
    "name": "Uwe Kleine-König",
    "email": "u.kleine-koenig@baylibre.com",
    "time": "Tue Apr 01 12:29:00 2025 +0200"
  },
  "committer": {
    "name": "Uwe Kleine-König",
    "email": "ukleinek@kernel.org",
    "time": "Fri Apr 04 09:23:39 2025 +0200"
  },
  "message": "pwm: rcar: Improve register calculation\n\nThere were several issues in the function rcar_pwm_set_counter():\n\n - The u64 values period_ns and duty_ns were cast to int on function\n   call which might loose bits on 32 bit architectures.\n   Fix: Make parameters to rcar_pwm_set_counter() u64\n - The algorithm divided by the result of a division which looses\n   precision.\n   Fix: Make use of mul_u64_u64_div_u64()\n - The calculated values were just masked to fit the respective register\n   fields which again might loose bits.\n   Fix: Explicitly check for overlow\n\nImplement the respective fixes.\n\nA side effect of fixing the 2nd issue is that there is no division by 0\nif clk_get_rate() returns 0.\n\nFixes: ed6c1476bf7f (\"pwm: Add support for R-Car PWM Timer\")\nSigned-off-by: Uwe Kleine-König \u003cu.kleine-koenig@baylibre.com\u003e\nLink: https://lore.kernel.org/r/ab3dac794b2216cc1cc56d65c93dd164f8bd461b.1743501688.git.u.kleine-koenig@baylibre.com\n[ukleinek: Added an explicit #include \u003clinux/bitfield.h\u003e to please the\n0day build bot]\nLink: https://lore.kernel.org/oe-kbuild-all/202504031354.VJtxScP5-lkp@intel.com/\nReviewed-by: Geert Uytterhoeven \u003cgeert+renesas@glider.be\u003e\nSigned-off-by: Uwe Kleine-König \u003cukleinek@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2261789cc27dae46a615dfc63df2ae6510a80a23",
      "old_mode": 33188,
      "old_path": "drivers/pwm/pwm-rcar.c",
      "new_id": "578dbdd2d5a721bea82d083c66eae2a14dcc5460",
      "new_mode": 33188,
      "new_path": "drivers/pwm/pwm-rcar.c"
    }
  ]
}
