All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com,
	Guenter Roeck <groeck@google.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [chrome-os:chromeos-6.1 7/334] drivers/usb/gadget/function/f_accessory.c:1078:5: warning: no previous prototype for 'acc_ctrlrequest_composite'
Date: Thu, 30 Mar 2023 13:17:10 +0800	[thread overview]
Message-ID: <202303301317.ZunFrAWJ-lkp@intel.com> (raw)

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-6.1
head:   357c6e4b48a407ae0a90fb4a1b61f63e1111fbbe
commit: 1a7e5d4a3fc8666fcb5d9eb055f5c7d979f08584 [7/334] FROMGIT: ANDROID: usb: f_accessory: Check buffer size when initialised via composite
config: arc-randconfig-r043-20230330 (https://download.01.org/0day-ci/archive/20230330/202303301317.ZunFrAWJ-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-6.1
        git checkout 1a7e5d4a3fc8666fcb5d9eb055f5c7d979f08584
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/usb/gadget/function/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303301317.ZunFrAWJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/usb/gadget/function/f_accessory.c:965:5: warning: no previous prototype for 'acc_ctrlrequest' [-Wmissing-prototypes]
     965 | int acc_ctrlrequest(struct usb_composite_dev *cdev,
         |     ^~~~~~~~~~~~~~~
>> drivers/usb/gadget/function/f_accessory.c:1078:5: warning: no previous prototype for 'acc_ctrlrequest_composite' [-Wmissing-prototypes]
    1078 | int acc_ctrlrequest_composite(struct usb_composite_dev *cdev,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/function/f_accessory.c:1419:6: warning: no previous prototype for 'acc_disconnect' [-Wmissing-prototypes]
    1419 | void acc_disconnect(void)
         |      ^~~~~~~~~~~~~~
   drivers/usb/gadget/function/f_accessory.c:1524:5: warning: no previous prototype for 'acc_ctrlrequest_configfs' [-Wmissing-prototypes]
    1524 | int acc_ctrlrequest_configfs(struct usb_function *f,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/acc_ctrlrequest_composite +1078 drivers/usb/gadget/function/f_accessory.c

  1077	
> 1078	int acc_ctrlrequest_composite(struct usb_composite_dev *cdev,
  1079				      const struct usb_ctrlrequest *ctrl)
  1080	{
  1081		u16 w_length = le16_to_cpu(ctrl->wLength);
  1082	
  1083		if (w_length > USB_COMP_EP0_BUFSIZ) {
  1084			if (ctrl->bRequestType & USB_DIR_IN) {
  1085				/* Cast away the const, we are going to overwrite on purpose. */
  1086				__le16 *temp = (__le16 *)&ctrl->wLength;
  1087	
  1088				*temp = cpu_to_le16(USB_COMP_EP0_BUFSIZ);
  1089				w_length = USB_COMP_EP0_BUFSIZ;
  1090			} else {
  1091				return -EINVAL;
  1092			}
  1093		}
  1094		return acc_ctrlrequest(cdev, ctrl);
  1095	}
  1096	EXPORT_SYMBOL_GPL(acc_ctrlrequest_composite);
  1097	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

                 reply	other threads:[~2023-03-30  5:17 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=202303301317.ZunFrAWJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --cc=groeck@google.com \
    --cc=oe-kbuild-all@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.