From: kernel test robot <lkp@intel.com>
To: Ma Ke <make24@iscas.ac.cn>,
gregkh@linuxfoundation.org, u.kleine-koenig@pengutronix.de
Cc: oe-kbuild-all@lists.linux.dev, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: r8a66597-udc: validate endpoint index for r8a66597 udc
Date: Wed, 26 Jun 2024 12:32:10 +0800 [thread overview]
Message-ID: <202406261220.OagNp3Mb-lkp@intel.com> (raw)
In-Reply-To: <20240622142308.1929531-1-make24@iscas.ac.cn>
Hi Ma,
kernel test robot noticed the following build errors:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on usb/usb-next usb/usb-linus linus/master v6.10-rc5 next-20240625]
[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/Ma-Ke/usb-gadget-r8a66597-udc-validate-endpoint-index-for-r8a66597-udc/20240626-003228
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20240622142308.1929531-1-make24%40iscas.ac.cn
patch subject: [PATCH] usb: gadget: r8a66597-udc: validate endpoint index for r8a66597 udc
config: i386-buildonly-randconfig-004-20240626 (https://download.01.org/0day-ci/archive/20240626/202406261220.OagNp3Mb-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240626/202406261220.OagNp3Mb-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406261220.OagNp3Mb-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/usb/gadget/udc/r8a66597-udc.c: In function 'get_status':
>> drivers/usb/gadget/udc/r8a66597-udc.c:1178:29: error: 'USB_MAX_ENDPOINTS' undeclared (first use in this function); did you mean 'USB_DT_ENDPOINT'?
1178 | if (pipe >= USB_MAX_ENDPOINTS)
| ^~~~~~~~~~~~~~~~~
| USB_DT_ENDPOINT
drivers/usb/gadget/udc/r8a66597-udc.c:1178:29: note: each undeclared identifier is reported only once for each function it appears in
drivers/usb/gadget/udc/r8a66597-udc.c: In function 'clear_feature':
drivers/usb/gadget/udc/r8a66597-udc.c:1217:29: error: 'USB_MAX_ENDPOINTS' undeclared (first use in this function); did you mean 'USB_DT_ENDPOINT'?
1217 | if (pipe >= USB_MAX_ENDPOINTS)
| ^~~~~~~~~~~~~~~~~
| USB_DT_ENDPOINT
drivers/usb/gadget/udc/r8a66597-udc.c: In function 'set_feature':
drivers/usb/gadget/udc/r8a66597-udc.c:1280:29: error: 'USB_MAX_ENDPOINTS' undeclared (first use in this function); did you mean 'USB_DT_ENDPOINT'?
1280 | if (pipe >= USB_MAX_ENDPOINTS)
| ^~~~~~~~~~~~~~~~~
| USB_DT_ENDPOINT
vim +1178 drivers/usb/gadget/udc/r8a66597-udc.c
1158
1159 static void get_status(struct r8a66597 *r8a66597, struct usb_ctrlrequest *ctrl)
1160 __releases(r8a66597->lock)
1161 __acquires(r8a66597->lock)
1162 {
1163 struct r8a66597_ep *ep;
1164 u16 pid;
1165 u16 status = 0;
1166 u16 w_index = le16_to_cpu(ctrl->wIndex);
1167
1168 switch (ctrl->bRequestType & USB_RECIP_MASK) {
1169 case USB_RECIP_DEVICE:
1170 status = r8a66597->device_status;
1171 break;
1172 case USB_RECIP_INTERFACE:
1173 status = 0;
1174 break;
1175 case USB_RECIP_ENDPOINT:
1176 int pipe = w_index & USB_ENDPOINT_NUMBER_MASK;
1177
> 1178 if (pipe >= USB_MAX_ENDPOINTS)
1179 break;
1180 ep = r8a66597->epaddr2ep[pipe];
1181 pid = control_reg_get_pid(r8a66597, ep->pipenum);
1182 if (pid == PID_STALL)
1183 status = 1 << USB_ENDPOINT_HALT;
1184 else
1185 status = 0;
1186 break;
1187 default:
1188 pipe_stall(r8a66597, 0);
1189 return; /* exit */
1190 }
1191
1192 r8a66597->ep0_data = cpu_to_le16(status);
1193 r8a66597->ep0_req->buf = &r8a66597->ep0_data;
1194 r8a66597->ep0_req->length = 2;
1195 /* AV: what happens if we get called again before that gets through? */
1196 spin_unlock(&r8a66597->lock);
1197 r8a66597_queue(r8a66597->gadget.ep0, r8a66597->ep0_req, GFP_ATOMIC);
1198 spin_lock(&r8a66597->lock);
1199 }
1200
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-06-26 4:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-22 14:23 [PATCH] usb: gadget: r8a66597-udc: validate endpoint index for r8a66597 udc Ma Ke
2024-06-22 15:30 ` Markus Elfring
2024-06-26 4:32 ` kernel test robot [this message]
2024-06-26 5:34 ` kernel test robot
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=202406261220.OagNp3Mb-lkp@intel.com \
--to=lkp@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=make24@iscas.ac.cn \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=u.kleine-koenig@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox