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/soundwire/debugfs.c:159:39-44: opportunity for str_read_write(value)
Date: Fri, 24 Jan 2025 08:57:11 +0800 [thread overview]
Message-ID: <202501240821.hGJS6MKf-lkp@intel.com> (raw)
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
reply other threads:[~2025-01-24 0:58 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=202501240821.hGJS6MKf-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.