* [android-common:android12-5.10 9/10] drivers/usb/gadget/function/f_accessory.c:372:23: sparse: sparse: Using plain integer as NULL pointer
@ 2021-06-08 0:13 kernel test robot
2021-06-08 0:13 ` [RFC PATCH android-common] ANDROID: usb: f_accessory: acc_ctrlrequest_configfs() can be static kernel test robot
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-06-08 0:13 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3233 bytes --]
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 811618a9016c45b1f01ec5ff7f9624aae6495bc7
commit: 03f232dcf8d411cd1b7fa6207018b706dbaf8229 [9/10] ANDROID: usb: f_accessory: Avoid bitfields for shared variables
config: i386-randconfig-s032-20210607 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 03f232dcf8d411cd1b7fa6207018b706dbaf8229
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/usb/gadget/function/f_accessory.c:372:23: sparse: sparse: Using plain integer as NULL pointer
drivers/usb/gadget/function/f_accessory.c:779:35: sparse: sparse: Using plain integer as NULL pointer
drivers/usb/gadget/function/f_accessory.c:793:23: sparse: sparse: Using plain integer as NULL pointer
drivers/usb/gadget/function/f_accessory.c:835:23: sparse: sparse: Using plain integer as NULL pointer
>> drivers/usb/gadget/function/f_accessory.c:1503:5: sparse: sparse: symbol 'acc_ctrlrequest_configfs' was not declared. Should it be static?
Please review and possibly fold the followup patch.
vim +372 drivers/usb/gadget/function/f_accessory.c
483cb5629ea789 Benoit Goby 2011-12-19 363
483cb5629ea789 Benoit Goby 2011-12-19 364 /* remove a request from the head of a list */
483cb5629ea789 Benoit Goby 2011-12-19 365 static struct usb_request *req_get(struct acc_dev *dev, struct list_head *head)
483cb5629ea789 Benoit Goby 2011-12-19 366 {
483cb5629ea789 Benoit Goby 2011-12-19 367 unsigned long flags;
483cb5629ea789 Benoit Goby 2011-12-19 368 struct usb_request *req;
483cb5629ea789 Benoit Goby 2011-12-19 369
483cb5629ea789 Benoit Goby 2011-12-19 370 spin_lock_irqsave(&dev->lock, flags);
483cb5629ea789 Benoit Goby 2011-12-19 371 if (list_empty(head)) {
483cb5629ea789 Benoit Goby 2011-12-19 @372 req = 0;
483cb5629ea789 Benoit Goby 2011-12-19 373 } else {
483cb5629ea789 Benoit Goby 2011-12-19 374 req = list_first_entry(head, struct usb_request, list);
483cb5629ea789 Benoit Goby 2011-12-19 375 list_del(&req->list);
483cb5629ea789 Benoit Goby 2011-12-19 376 }
483cb5629ea789 Benoit Goby 2011-12-19 377 spin_unlock_irqrestore(&dev->lock, flags);
483cb5629ea789 Benoit Goby 2011-12-19 378 return req;
483cb5629ea789 Benoit Goby 2011-12-19 379 }
483cb5629ea789 Benoit Goby 2011-12-19 380
:::::: The code at line 372 was first introduced by commit
:::::: 483cb5629ea7893f94481511e630ae14a5c0d1c0 ANDROID: usb: gadget: f_accessory: Add Android Accessory function
:::::: TO: Benoit Goby <benoit@android.com>
:::::: CC: Todd Kjos <tkjos@google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30650 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [RFC PATCH android-common] ANDROID: usb: f_accessory: acc_ctrlrequest_configfs() can be static
2021-06-08 0:13 [android-common:android12-5.10 9/10] drivers/usb/gadget/function/f_accessory.c:372:23: sparse: sparse: Using plain integer as NULL pointer kernel test robot
@ 2021-06-08 0:13 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-06-08 0:13 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 913 bytes --]
drivers/usb/gadget/function/f_accessory.c:1503:5: warning: symbol 'acc_ctrlrequest_configfs' was not declared. Should it be static?
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
f_accessory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/f_accessory.c b/drivers/usb/gadget/function/f_accessory.c
index a2dc735a9438d..9122bf8344c9a 100644
--- a/drivers/usb/gadget/function/f_accessory.c
+++ b/drivers/usb/gadget/function/f_accessory.c
@@ -1500,7 +1500,7 @@ static void acc_free(struct usb_function *f)
put_acc_dev(dev);
}
-int acc_ctrlrequest_configfs(struct usb_function *f,
+static int acc_ctrlrequest_configfs(struct usb_function *f,
const struct usb_ctrlrequest *ctrl) {
if (f->config != NULL && f->config->cdev != NULL)
return acc_ctrlrequest(f->config->cdev, ctrl);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-08 0:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 0:13 [android-common:android12-5.10 9/10] drivers/usb/gadget/function/f_accessory.c:372:23: sparse: sparse: Using plain integer as NULL pointer kernel test robot
2021-06-08 0:13 ` [RFC PATCH android-common] ANDROID: usb: f_accessory: acc_ctrlrequest_configfs() can be static 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.