From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: drivers/net/can/dummy_can.c:135:7-25: opportunity for str_on_off(enabled & BIT ( idx ))
Date: Fri, 13 Mar 2026 20:34:34 +0800 [thread overview]
Message-ID: <202603132012.pFMvHAlX-lkp@intel.com> (raw)
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
reply other threads:[~2026-03-13 12:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603132012.pFMvHAlX-lkp@intel.com \
--to=lkp@intel.com \
--cc=julia.lawall@inria.fr \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.