* drivers/clk/bcm/clk-bcm2835.c:952:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead.
@ 2026-10-04 12:33 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-04 12:33 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: oe-kbuild-all, linux-kernel, Shuah Khan, Johannes Berg, David Gow
Hi Thomas,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6addb4f385570ebc11c4eb499a4f1c149f313e84
commit: 031cdd3bc3f369553933c1b0f4cb18000162c8ff kunit: Enable PCI on UML without triggering WARN()
date: 1 year, 1 month ago
config: um-randconfig-r2104-20261004 (https://download.01.org/0day-ci/archive/20261004/202610041410.n4VXsQjz-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project d7e4505dd447d115d85fdea45cd71030ac1d86ee)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 031cdd3bc3f3 ("kunit: Enable PCI on UML without triggering WARN()")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610041410.n4VXsQjz-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/clk/bcm/clk-bcm2835.c:952:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead.
drivers/clk/bcm/clk-bcm2835.c:554:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead.
--
>> drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c:327:2-8: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead.
--
>> drivers/watchdog/rti_wdt.c:187:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead.
drivers/watchdog/rti_wdt.c:279:2-8: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead.
--
>> drivers/gpu/drm/tegra/output.c:167:8-28: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/gpu/drm/kmb/kmb_drv.c:520:2-8: ERROR: missing put_device; call of_find_device_by_node on line 507, but without a corresponding object release within this function.
drivers/gpu/drm/kmb/kmb_drv.c:523:2-8: ERROR: missing put_device; call of_find_device_by_node on line 507, but without a corresponding object release within this function.
drivers/gpu/drm/kmb/kmb_drv.c:530:2-8: ERROR: missing put_device; call of_find_device_by_node on line 507, but without a corresponding object release within this function.
drivers/gpu/drm/kmb/kmb_drv.c:580:1-7: ERROR: missing put_device; call of_find_device_by_node on line 507, but without a corresponding object release within this function.
--
>> drivers/gpu/drm/panthor/panthor_heap.c:404:28-33: ERROR: invalid reference to the index variable of the iterator on line 392
vim +952 drivers/clk/bcm/clk-bcm2835.c
41691b8862e2a3 Eric Anholt 2015-10-08 940
41691b8862e2a3 Eric Anholt 2015-10-08 941 static u32 bcm2835_clock_choose_div(struct clk_hw *hw,
41691b8862e2a3 Eric Anholt 2015-10-08 942 unsigned long rate,
8ca011ef4af48a Maxime Ripard 2021-09-22 943 unsigned long parent_rate)
41691b8862e2a3 Eric Anholt 2015-10-08 944 {
41691b8862e2a3 Eric Anholt 2015-10-08 945 struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
41691b8862e2a3 Eric Anholt 2015-10-08 946 const struct bcm2835_clock_data *data = clock->data;
9c95b32ca09364 Remi Pommarel 2015-12-06 947 u32 unused_frac_mask =
9c95b32ca09364 Remi Pommarel 2015-12-06 948 GENMASK(CM_DIV_FRAC_BITS - data->frac_bits, 0) >> 1;
41691b8862e2a3 Eric Anholt 2015-10-08 949 u64 temp = (u64)parent_rate << CM_DIV_FRAC_BITS;
959ca92a3235fc Martin Sperl 2016-02-29 950 u32 div, mindiv, maxdiv;
41691b8862e2a3 Eric Anholt 2015-10-08 951
88110a9f6209be Stefan Wahren 2022-04-28 @952 do_div(temp, rate);
41691b8862e2a3 Eric Anholt 2015-10-08 953 div = temp;
41691b8862e2a3 Eric Anholt 2015-10-08 954 div &= ~unused_frac_mask;
41691b8862e2a3 Eric Anholt 2015-10-08 955
959ca92a3235fc Martin Sperl 2016-02-29 956 /* different clamping limits apply for a mash clock */
959ca92a3235fc Martin Sperl 2016-02-29 957 if (data->is_mash_clock) {
959ca92a3235fc Martin Sperl 2016-02-29 958 /* clamp to min divider of 2 */
959ca92a3235fc Martin Sperl 2016-02-29 959 mindiv = 2 << CM_DIV_FRAC_BITS;
959ca92a3235fc Martin Sperl 2016-02-29 960 /* clamp to the highest possible integer divider */
959ca92a3235fc Martin Sperl 2016-02-29 961 maxdiv = (BIT(data->int_bits) - 1) << CM_DIV_FRAC_BITS;
959ca92a3235fc Martin Sperl 2016-02-29 962 } else {
997f16bd5d2e9b Martin Sperl 2016-02-29 963 /* clamp to min divider of 1 */
959ca92a3235fc Martin Sperl 2016-02-29 964 mindiv = 1 << CM_DIV_FRAC_BITS;
997f16bd5d2e9b Martin Sperl 2016-02-29 965 /* clamp to the highest possible fractional divider */
959ca92a3235fc Martin Sperl 2016-02-29 966 maxdiv = GENMASK(data->int_bits + CM_DIV_FRAC_BITS - 1,
959ca92a3235fc Martin Sperl 2016-02-29 967 CM_DIV_FRAC_BITS - data->frac_bits);
959ca92a3235fc Martin Sperl 2016-02-29 968 }
959ca92a3235fc Martin Sperl 2016-02-29 969
959ca92a3235fc Martin Sperl 2016-02-29 970 /* apply the clamping limits */
959ca92a3235fc Martin Sperl 2016-02-29 971 div = max_t(u32, div, mindiv);
959ca92a3235fc Martin Sperl 2016-02-29 972 div = min_t(u32, div, maxdiv);
41691b8862e2a3 Eric Anholt 2015-10-08 973
41691b8862e2a3 Eric Anholt 2015-10-08 974 return div;
41691b8862e2a3 Eric Anholt 2015-10-08 975 }
41691b8862e2a3 Eric Anholt 2015-10-08 976
:::::: The code at line 952 was first introduced by commit
:::::: 88110a9f6209be1ed7312bae029d000bc7c7e88f clk: bcm2835: fix bcm2835_clock_choose_div
:::::: TO: Stefan Wahren <stefan.wahren@i2se.com>
:::::: CC: Stephen Boyd <sboyd@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-04 12:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-04 12:33 drivers/clk/bcm/clk-bcm2835.c:952:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®