From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH v5 06/11] misc: amd-sbi: Add support for AMD_SBI IOCTL
Date: Fri, 7 Mar 2025 11:39:05 +0800 [thread overview]
Message-ID: <202503071145.fhmAEjMr-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250303105902.215009-7-akshay.gupta@amd.com>
References: <20250303105902.215009-7-akshay.gupta@amd.com>
TO: Akshay Gupta <akshay.gupta@amd.com>
TO: linux-hwmon@vger.kernel.org
TO: linux-kernel@vger.kernel.org
CC: linux@roeck-us.net
CC: gregkh@linuxfoundation.org
CC: arnd@arndb.de
CC: shyam-sundar.s-k@amd.com
CC: gautham.shenoy@amd.com
CC: mario.limonciello@amd.com
CC: naveenkrishna.chatradhi@amd.com
CC: Akshay Gupta <akshay.gupta@amd.com>
Hi Akshay,
kernel test robot noticed the following build warnings:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus groeck-staging/hwmon-next soc/for-next linus/master v6.14-rc5 next-20250306]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Akshay-Gupta/hwmon-misc-amd-sbi-Move-core-sbrmi-from-hwmon-to-misc/20250303-190830
base: char-misc/char-misc-testing
patch link: https://lore.kernel.org/r/20250303105902.215009-7-akshay.gupta%40amd.com
patch subject: [PATCH v5 06/11] misc: amd-sbi: Add support for AMD_SBI IOCTL
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: riscv-randconfig-r072-20250306 (https://download.01.org/0day-ci/archive/20250307/202503071145.fhmAEjMr-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
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: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202503071145.fhmAEjMr-lkp@intel.com/
smatch warnings:
drivers/misc/amd-sbi/rmi-core.c:110 sbrmi_ioctl() warn: can 'data' even be NULL?
vim +/data +110 drivers/misc/amd-sbi/rmi-core.c
dd49a6be4bc20c Akshay Gupta 2025-03-03 100
dd49a6be4bc20c Akshay Gupta 2025-03-03 101 static long sbrmi_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
dd49a6be4bc20c Akshay Gupta 2025-03-03 102 {
dd49a6be4bc20c Akshay Gupta 2025-03-03 103 int __user *arguser = (int __user *)arg;
dd49a6be4bc20c Akshay Gupta 2025-03-03 104 struct apml_message msg = { 0 };
dd49a6be4bc20c Akshay Gupta 2025-03-03 105 bool read = false;
dd49a6be4bc20c Akshay Gupta 2025-03-03 106 int ret;
dd49a6be4bc20c Akshay Gupta 2025-03-03 107
dd49a6be4bc20c Akshay Gupta 2025-03-03 108 struct sbrmi_data *data = container_of(fp->private_data, struct sbrmi_data,
dd49a6be4bc20c Akshay Gupta 2025-03-03 109 sbrmi_misc_dev);
dd49a6be4bc20c Akshay Gupta 2025-03-03 @110 if (!data)
dd49a6be4bc20c Akshay Gupta 2025-03-03 111 return -ENODEV;
dd49a6be4bc20c Akshay Gupta 2025-03-03 112
dd49a6be4bc20c Akshay Gupta 2025-03-03 113 /* Copy the structure from user */
dd49a6be4bc20c Akshay Gupta 2025-03-03 114 if (copy_struct_from_user(&msg, sizeof(msg), arguser,
dd49a6be4bc20c Akshay Gupta 2025-03-03 115 sizeof(struct apml_message)))
dd49a6be4bc20c Akshay Gupta 2025-03-03 116 return -EFAULT;
dd49a6be4bc20c Akshay Gupta 2025-03-03 117
dd49a6be4bc20c Akshay Gupta 2025-03-03 118 /* Is this a read/monitor/get request */
dd49a6be4bc20c Akshay Gupta 2025-03-03 119 if (msg.data_in.reg_in[AMD_SBI_RD_FLAG_INDEX])
dd49a6be4bc20c Akshay Gupta 2025-03-03 120 read = true;
dd49a6be4bc20c Akshay Gupta 2025-03-03 121
dd49a6be4bc20c Akshay Gupta 2025-03-03 122 switch (msg.cmd) {
dd49a6be4bc20c Akshay Gupta 2025-03-03 123 case 0 ... 0x999:
dd49a6be4bc20c Akshay Gupta 2025-03-03 124 /* Mailbox protocol */
dd49a6be4bc20c Akshay Gupta 2025-03-03 125 ret = rmi_mailbox_xfer(data, &msg);
dd49a6be4bc20c Akshay Gupta 2025-03-03 126 break;
dd49a6be4bc20c Akshay Gupta 2025-03-03 127 default:
dd49a6be4bc20c Akshay Gupta 2025-03-03 128 return -EINVAL;
dd49a6be4bc20c Akshay Gupta 2025-03-03 129 }
dd49a6be4bc20c Akshay Gupta 2025-03-03 130
dd49a6be4bc20c Akshay Gupta 2025-03-03 131 /* Copy results back to user only for get/monitor commands and firmware failures */
dd49a6be4bc20c Akshay Gupta 2025-03-03 132 if ((read && !ret) || ret == -EPROTOTYPE) {
dd49a6be4bc20c Akshay Gupta 2025-03-03 133 if (copy_to_user(arguser, &msg, sizeof(struct apml_message)))
dd49a6be4bc20c Akshay Gupta 2025-03-03 134 ret = -EFAULT;
dd49a6be4bc20c Akshay Gupta 2025-03-03 135 }
dd49a6be4bc20c Akshay Gupta 2025-03-03 136 return ret;
dd49a6be4bc20c Akshay Gupta 2025-03-03 137 }
dd49a6be4bc20c Akshay Gupta 2025-03-03 138
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-03-07 3:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 3:39 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-03 10:58 [PATCH v5 00/11] misc: Move AMD side band interface(SBI) functionality Akshay Gupta
2025-03-03 10:58 ` [PATCH v5 06/11] misc: amd-sbi: Add support for AMD_SBI IOCTL Akshay Gupta
2025-03-03 16:18 ` Arnd Bergmann
2025-03-07 10:43 ` Gupta, Akshay
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=202503071145.fhmAEjMr-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--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.