* drivers/soundwire/debugfs.c:159:39-44: opportunity for str_read_write(value)
@ 2025-01-24 0:57 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-24 0:57 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: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>
CC: Vinod Koul <vkoul@kernel.org>
CC: Rander Wang <rander.wang@intel.com>
CC: Bard Liao <yung-chuan.liao@linux.intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d0d106a2bd21499901299160744e5fe9f4c83ddb
commit: fe46d2a4301de1299fb32c0317ec316706ceaad6 soundwire: debugfs: add interface to read/write commands
date: 8 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 8 months ago
config: x86_64-randconfig-104-20250124 (https://download.01.org/0day-ci/archive/20250124/202501240821.hGJS6MKf-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.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/202501240821.hGJS6MKf-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/soundwire/debugfs.c:159:39-44: opportunity for str_read_write(value)
vim +159 drivers/soundwire/debugfs.c
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 148
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 149 static int set_command(void *data, u64 value)
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 150 {
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 151 struct sdw_slave *slave = data;
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 152
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 153 if (value > 1)
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 154 return -EINVAL;
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 155
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 156 /* Userspace changed the hardware state behind the kernel's back */
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 157 add_taint(TAINT_USER, LOCKDEP_STILL_OK);
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 158
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 @159 dev_dbg(&slave->dev, "command: %s\n", value ? "read" : "write");
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 160 cmd = value;
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 161
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 162 return 0;
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 163 }
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 164 DEFINE_DEBUGFS_ATTRIBUTE(set_command_fops, NULL,
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 165 set_command, "%llu\n");
fe46d2a4301de1 Pierre-Louis Bossart 2024-06-03 166
--
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:[~2025-01-24 0:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-24 0:57 drivers/soundwire/debugfs.c:159:39-44: opportunity for str_read_write(value) 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.