* drivers/net/can/dummy_can.c:135:7-25: opportunity for str_on_off(enabled & BIT ( idx ))
@ 2026-03-13 12:34 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-03-13 12:34 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Vincent Mailhol <mailhol@kernel.org>
CC: "Marc Kleine-Budde" <mkl@pengutronix.de>
CC: Oliver Hartkopp <socketcan@hartkopp.net>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 80234b5ab240f52fa45d201e899e207b9265ef91
commit: 816cf430e84b4628dba665491e78ce081a468fcb can: add dummy_can driver
date: 4 months ago
:::::: branch date: 2 days ago
:::::: commit date: 4 months ago
config: m68k-randconfig-r054-20260313 (https://download.01.org/0day-ci/archive/20260313/202603132012.pFMvHAlX-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 10.5.0
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
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202603132012.pFMvHAlX-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/net/can/dummy_can.c:135:7-25: opportunity for str_on_off(enabled & BIT ( idx ))
vim +135 drivers/net/can/dummy_can.c
816cf430e84b462 Vincent Mailhol 2025-11-26 116
816cf430e84b462 Vincent Mailhol 2025-11-26 117 static void dummy_can_print_ctrlmode(struct net_device *dev)
816cf430e84b462 Vincent Mailhol 2025-11-26 118 {
816cf430e84b462 Vincent Mailhol 2025-11-26 119 struct dummy_can *priv = netdev_priv(dev);
816cf430e84b462 Vincent Mailhol 2025-11-26 120 struct can_priv *can_priv = &priv->can;
816cf430e84b462 Vincent Mailhol 2025-11-26 121 unsigned long supported = can_priv->ctrlmode_supported;
816cf430e84b462 Vincent Mailhol 2025-11-26 122 u32 enabled = can_priv->ctrlmode;
816cf430e84b462 Vincent Mailhol 2025-11-26 123
816cf430e84b462 Vincent Mailhol 2025-11-26 124 netdev_dbg(dev, "Control modes:\n");
816cf430e84b462 Vincent Mailhol 2025-11-26 125 netdev_dbg(dev, "\tsupported: 0x%08x\n", (u32)supported);
816cf430e84b462 Vincent Mailhol 2025-11-26 126 netdev_dbg(dev, "\tenabled: 0x%08x\n", enabled);
816cf430e84b462 Vincent Mailhol 2025-11-26 127
816cf430e84b462 Vincent Mailhol 2025-11-26 128 if (supported) {
816cf430e84b462 Vincent Mailhol 2025-11-26 129 int idx;
816cf430e84b462 Vincent Mailhol 2025-11-26 130
816cf430e84b462 Vincent Mailhol 2025-11-26 131 netdev_dbg(dev, "\tlist:");
816cf430e84b462 Vincent Mailhol 2025-11-26 132 for_each_set_bit(idx, &supported, BITS_PER_TYPE(u32))
816cf430e84b462 Vincent Mailhol 2025-11-26 133 netdev_dbg(dev, "\t\t%s: %s\n",
816cf430e84b462 Vincent Mailhol 2025-11-26 134 can_get_ctrlmode_str(BIT(idx)),
816cf430e84b462 Vincent Mailhol 2025-11-26 @135 enabled & BIT(idx) ? "on" : "off");
816cf430e84b462 Vincent Mailhol 2025-11-26 136 }
816cf430e84b462 Vincent Mailhol 2025-11-26 137 }
816cf430e84b462 Vincent Mailhol 2025-11-26 138
--
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-03-13 12:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13 12:34 drivers/net/can/dummy_can.c:135:7-25: opportunity for str_on_off(enabled & BIT ( idx )) kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.