)]}'
{
  "commit": "7ca59947b5fcf94e7ea4029d1bd0f7c41500a161",
  "tree": "7942a44577c7aefa8b305bbe13b26d54b522e61a",
  "parents": [
    "6df320abbb40654085d7258de33d78481e93ac8d"
  ],
  "author": {
    "name": "Josh Poimboeuf",
    "email": "jpoimboe@kernel.org",
    "time": "Tue Apr 01 12:28:59 2025 +0200"
  },
  "committer": {
    "name": "Uwe Kleine-König",
    "email": "ukleinek@kernel.org",
    "time": "Wed Apr 02 18:31:42 2025 +0200"
  },
  "message": "pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()\n\nWith CONFIG_COMPILE_TEST \u0026\u0026 !CONFIG_HAVE_CLK, pwm_mediatek_config() has a\ndivide-by-zero in the following line:\n\n\tdo_div(resolution, clk_get_rate(pc-\u003eclk_pwms[pwm-\u003ehwpwm]));\n\ndue to the fact that the !CONFIG_HAVE_CLK version of clk_get_rate()\nreturns zero.\n\nThis is presumably just a theoretical problem: COMPILE_TEST overrides\nthe dependency on RALINK which would select COMMON_CLK.  Regardless it\u0027s\na good idea to check for the error explicitly to avoid divide-by-zero.\n\nFixes the following warning:\n\n  drivers/pwm/pwm-mediatek.o: warning: objtool: .text: unexpected end of section\n\nSigned-off-by: Josh Poimboeuf \u003cjpoimboe@kernel.org\u003e\nLink: https://lore.kernel.org/r/fb56444939325cc173e752ba199abd7aeae3bf12.1742852847.git.jpoimboe@kernel.org\n[ukleinek: s/CONFIG_CLK/CONFIG_HAVE_CLK/]\nFixes: caf065f8fd58 (\"pwm: Add MediaTek PWM support\")\nSigned-off-by: Uwe Kleine-König \u003cu.kleine-koenig@baylibre.com\u003e\nLink: https://lore.kernel.org/r/9e78a0796acba3435553ed7db1c7965dcffa6215.1743501688.git.u.kleine-koenig@baylibre.com\nSigned-off-by: Uwe Kleine-König \u003cukleinek@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "01dfa0fab80a442a99f31543ae1bb82f875334dd",
      "old_mode": 33188,
      "old_path": "drivers/pwm/pwm-mediatek.c",
      "new_id": "7eaab58314995c64b4b8fcf022450ea3fd2d7841",
      "new_mode": 33188,
      "new_path": "drivers/pwm/pwm-mediatek.c"
    }
  ]
}
