All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH RFC 4/5] usb: cdnsp: usb:cdns3 Add main part of Cadence USBSSP DRD Driver
Date: Fri, 26 Jun 2020 17:04:05 +0800	[thread overview]
Message-ID: <202006261604.lJr8bFa2%lkp@intel.com> (raw)
In-Reply-To: <20200626045450.10205-5-pawell@cadence.com>

[-- Attachment #1: Type: text/plain, Size: 14271 bytes --]

Hi Pawel,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on robh/for-next balbi-usb/testing/next v5.8-rc2 next-20200626]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Pawel-Laszczak/Introduced-new-Cadence-USBSSP-DRD-Driver/20200626-125940
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 6e11ed52057ffc39941cb2de6d93cae522db4782)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

>> drivers/usb/cdnsp/ring.c:510:23: warning: no previous prototype for function 'cdnsp_trb_in_td' [-Wmissing-prototypes]
   struct cdnsp_segment *cdnsp_trb_in_td(struct cdnsp_device *pdev,
                         ^
   drivers/usb/cdnsp/ring.c:510:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   struct cdnsp_segment *cdnsp_trb_in_td(struct cdnsp_device *pdev,
   ^
   static 
>> drivers/usb/cdnsp/ring.c:572:6: warning: no previous prototype for function 'cdnsp_unmap_td_bounce_buffer' [-Wmissing-prototypes]
   void cdnsp_unmap_td_bounce_buffer(struct cdnsp_device *pdev,
        ^
   drivers/usb/cdnsp/ring.c:572:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void cdnsp_unmap_td_bounce_buffer(struct cdnsp_device *pdev,
   ^
   static 
>> drivers/usb/cdnsp/ring.c:1370:5: warning: no previous prototype for function 'cdnsp_handle_event' [-Wmissing-prototypes]
   int cdnsp_handle_event(struct cdnsp_device *pdev)
       ^
   drivers/usb/cdnsp/ring.c:1370:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int cdnsp_handle_event(struct cdnsp_device *pdev)
   ^
   static 
>> drivers/usb/cdnsp/ring.c:2286:6: warning: no previous prototype for function 'cdnsp_queue_vendor_command' [-Wmissing-prototypes]
   void cdnsp_queue_vendor_command(struct cdnsp_device *pdev,
        ^
   drivers/usb/cdnsp/ring.c:2286:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void cdnsp_queue_vendor_command(struct cdnsp_device *pdev,
   ^
   static 
>> drivers/usb/cdnsp/ring.c:2356:6: warning: no previous prototype for function 'cdnsp_queue_nop' [-Wmissing-prototypes]
   void cdnsp_queue_nop(struct cdnsp_device *pdev)
        ^
   drivers/usb/cdnsp/ring.c:2356:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void cdnsp_queue_nop(struct cdnsp_device *pdev)
   ^
   static 
   5 warnings generated.
--
>> drivers/usb/cdnsp/gadget.c:1865:6: warning: no previous prototype for function 'cdnsp_gadget_exit' [-Wmissing-prototypes]
   void cdnsp_gadget_exit(struct cdnsp *cdns)
        ^
   drivers/usb/cdnsp/gadget.c:1865:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void cdnsp_gadget_exit(struct cdnsp *cdns)
   ^
   static 
>> drivers/usb/cdnsp/gadget.c:1918:5: warning: no previous prototype for function 'cdnsp_gadget_init' [-Wmissing-prototypes]
   int cdnsp_gadget_init(struct cdnsp *cdns)
       ^
   drivers/usb/cdnsp/gadget.c:1918:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int cdnsp_gadget_init(struct cdnsp *cdns)
   ^
   static 
   2 warnings generated.
--
>> drivers/usb/cdnsp/mem.c:280:6: warning: no previous prototype for function 'cdnsp_ring_free' [-Wmissing-prototypes]
   void cdnsp_ring_free(struct cdnsp_device *pdev, struct cdnsp_ring *ring)
        ^
   drivers/usb/cdnsp/mem.c:280:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void cdnsp_ring_free(struct cdnsp_device *pdev, struct cdnsp_ring *ring)
   ^
   static 
>> drivers/usb/cdnsp/mem.c:1030:5: warning: no previous prototype for function 'cdnsp_alloc_erst' [-Wmissing-prototypes]
   int cdnsp_alloc_erst(struct cdnsp_device *pdev,
       ^
   drivers/usb/cdnsp/mem.c:1030:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int cdnsp_alloc_erst(struct cdnsp_device *pdev,
   ^
   static 
>> drivers/usb/cdnsp/mem.c:1060:6: warning: no previous prototype for function 'cdnsp_free_erst' [-Wmissing-prototypes]
   void cdnsp_free_erst(struct cdnsp_device *pdev, struct cdnsp_erst *erst)
        ^
   drivers/usb/cdnsp/mem.c:1060:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void cdnsp_free_erst(struct cdnsp_device *pdev, struct cdnsp_erst *erst)
   ^
   static 
   3 warnings generated.
--
>> drivers/usb/cdnsp/ep0.c:134:5: warning: no previous prototype for function 'cdnsp_w_index_to_ep_index' [-Wmissing-prototypes]
   int cdnsp_w_index_to_ep_index(__le32  wIndex)
       ^
   drivers/usb/cdnsp/ep0.c:134:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int cdnsp_w_index_to_ep_index(__le32  wIndex)
   ^
   static 
>> drivers/usb/cdnsp/ep0.c:185:6: warning: no previous prototype for function 'cdnsp_enter_test_mode' [-Wmissing-prototypes]
   void cdnsp_enter_test_mode(struct cdnsp_device *pdev)
        ^
   drivers/usb/cdnsp/ep0.c:185:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void cdnsp_enter_test_mode(struct cdnsp_device *pdev)
   ^
   static 
>> drivers/usb/cdnsp/ep0.c:237:15: error: use of undeclared identifier 'TEST_FORCE_EN'
                   if (tmode > TEST_FORCE_EN || tmode < TEST_J)
                               ^
>> drivers/usb/cdnsp/ep0.c:237:40: error: use of undeclared identifier 'TEST_J'
                   if (tmode > TEST_FORCE_EN || tmode < TEST_J)
                                                        ^
>> drivers/usb/cdnsp/ep0.c:306:5: warning: no previous prototype for function 'cdnsp_ep0_handle_feature' [-Wmissing-prototypes]
   int cdnsp_ep0_handle_feature(struct cdnsp_device *pdev,
       ^
   drivers/usb/cdnsp/ep0.c:306:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int cdnsp_ep0_handle_feature(struct cdnsp_device *pdev,
   ^
   static 
   3 warnings and 2 errors generated.
--
>> drivers/usb/cdnsp/host.c:16:5: warning: no previous prototype for function '__cdnsp_host_init' [-Wmissing-prototypes]
   int __cdnsp_host_init(struct cdnsp *cdns)
       ^
   drivers/usb/cdnsp/host.c:16:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __cdnsp_host_init(struct cdnsp *cdns)
   ^
   static 
>> drivers/usb/cdnsp/host.c:51:6: warning: no previous prototype for function 'cdnsp_host_exit' [-Wmissing-prototypes]
   void cdnsp_host_exit(struct cdnsp *cdns)
        ^
   drivers/usb/cdnsp/host.c:51:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void cdnsp_host_exit(struct cdnsp *cdns)
   ^
   static 
>> drivers/usb/cdnsp/host.c:58:5: warning: no previous prototype for function 'cdnsp_host_init' [-Wmissing-prototypes]
   int cdnsp_host_init(struct cdnsp *cdns)
       ^
   drivers/usb/cdnsp/host.c:58:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int cdnsp_host_init(struct cdnsp *cdns)
   ^
   static 
   3 warnings generated.

vim +/TEST_FORCE_EN +237 drivers/usb/cdnsp/ep0.c

   133	
 > 134	int cdnsp_w_index_to_ep_index(__le32  wIndex)
   135	{
   136		wIndex = le32_to_cpu(wIndex);
   137	
   138		if (!(wIndex & USB_ENDPOINT_NUMBER_MASK))
   139			return 0;
   140	
   141		return ((wIndex & USB_ENDPOINT_NUMBER_MASK) * 2) +
   142			(wIndex & USB_ENDPOINT_DIR_MASK ? 1 : 0) - 1;
   143	}
   144	
   145	static int cdnsp_ep0_handle_status(struct cdnsp_device *pdev,
   146					   struct usb_ctrlrequest *ctrl)
   147	{
   148		struct cdnsp_ep *pep;
   149		__le16 *response;
   150		int ep_sts = 0;
   151		u16 status = 0;
   152		u32 recipient;
   153	
   154		recipient = ctrl->bRequestType & USB_RECIP_MASK;
   155	
   156		switch (recipient) {
   157		case USB_RECIP_DEVICE:
   158			status = pdev->gadget.is_selfpowered |
   159				 ((pdev->u1_allowed) ? BIT(USB_DEV_STAT_U1_ENABLED) : 0) |
   160				 ((pdev->u2_allowed) ? BIT(USB_DEV_STAT_U2_ENABLED) : 0);
   161			break;
   162		case USB_RECIP_INTERFACE:
   163			break;
   164		case USB_RECIP_ENDPOINT:
   165			pep = &pdev->eps[cdnsp_w_index_to_ep_index(ctrl->wIndex)];
   166			ep_sts = GET_EP_CTX_STATE(pep->out_ctx);
   167	
   168			/* check if endpoint is stalled */
   169			if (ep_sts == EP_STATE_HALTED)
   170				status =  BIT(USB_ENDPOINT_HALT);
   171			break;
   172		default:
   173			return -EINVAL;
   174		}
   175	
   176		response = (__le16 *)pdev->setup_buf;
   177		*response = cpu_to_le16(status);
   178	
   179		pdev->ep0_preq.request.length = sizeof(*response);
   180		pdev->ep0_preq.request.buf = pdev->setup_buf;
   181	
   182		return cdnsp_ep_enqueue(pdev->ep0_preq.pep, &pdev->ep0_preq);
   183	}
   184	
 > 185	void cdnsp_enter_test_mode(struct cdnsp_device *pdev)
   186	{
   187		u32 temp;
   188	
   189		temp = readl(&pdev->active_port->regs->portpmsc) & ~GENMASK(31, 28);
   190		temp |= PORT_TEST_MODE(pdev->test_mode);
   191		writel(temp, &pdev->active_port->regs->portpmsc);
   192		pdev->test_mode = 0;
   193	}
   194	
   195	static int cdnsp_ep0_handle_feature_device(struct cdnsp_device *pdev,
   196						   struct usb_ctrlrequest *ctrl,
   197						   int set)
   198	{
   199		enum usb_device_state state;
   200		enum usb_device_speed speed;
   201		int ret = 0;
   202		u16 tmode;
   203	
   204		state = pdev->gadget.state;
   205		speed = pdev->gadget.speed;
   206	
   207		switch (le16_to_cpu(ctrl->wValue)) {
   208		case USB_DEVICE_REMOTE_WAKEUP:
   209			pdev->remote_wakeup_allowed = !!set;
   210			break;
   211		case USB_DEVICE_U1_ENABLE:
   212			if (state != USB_STATE_CONFIGURED || speed < USB_SPEED_SUPER)
   213				return -EINVAL;
   214	
   215			pdev->u1_allowed = !!set;
   216			break;
   217		case USB_DEVICE_U2_ENABLE:
   218			if (state != USB_STATE_CONFIGURED || speed < USB_SPEED_SUPER)
   219				return -EINVAL;
   220	
   221			pdev->u2_allowed = !!set;
   222			break;
   223		case USB_DEVICE_LTM_ENABLE:
   224			ret = -EINVAL;
   225			break;
   226		case USB_DEVICE_TEST_MODE:
   227			if (state != USB_STATE_CONFIGURED || speed > USB_SPEED_HIGH)
   228				return -EINVAL;
   229	
   230			tmode = le16_to_cpu(ctrl->wIndex);
   231	
   232			if (!set || (tmode & 0xff) != 0)
   233				return -EINVAL;
   234	
   235			tmode = tmode >> 8;
   236	
 > 237			if (tmode > TEST_FORCE_EN || tmode < TEST_J)
   238				return -EINVAL;
   239	
   240			pdev->test_mode = tmode;
   241	
   242			/*
   243			 * Test mode must be set before Status Stage but controller
   244			 * will start testing sequence after Status Stage.
   245			 */
   246			cdnsp_enter_test_mode(pdev);
   247			break;
   248		default:
   249			ret = -EINVAL;
   250		}
   251	
   252		return ret;
   253	}
   254	
   255	static int cdnsp_ep0_handle_feature_intf(struct cdnsp_device *pdev,
   256						 struct usb_ctrlrequest *ctrl,
   257						 int set)
   258	{
   259		u32 wValue;
   260		int ret = 0;
   261	
   262		wValue = le16_to_cpu(ctrl->wValue);
   263	
   264		switch (wValue) {
   265		case USB_INTRF_FUNC_SUSPEND:
   266			break;
   267		default:
   268			ret = -EINVAL;
   269		}
   270	
   271		return ret;
   272	}
   273	
   274	static int cdnsp_ep0_handle_feature_endpoint(struct cdnsp_device *pdev,
   275						     struct usb_ctrlrequest *ctrl,
   276						     int set)
   277	{
   278		struct cdnsp_ring *ep_ring;
   279		struct cdnsp_ep *pep;
   280		int ret = 0;
   281		u32 wValue;
   282	
   283		wValue = le16_to_cpu(ctrl->wValue);
   284		pep = &pdev->eps[cdnsp_w_index_to_ep_index(ctrl->wIndex)];
   285		ep_ring = pep->ring;
   286	
   287		switch (wValue) {
   288		case USB_ENDPOINT_HALT:
   289			if (!set && (pep->ep_state & EP_WEDGE)) {
   290				/* Resets Sequence Number */
   291				cdnsp_halt_endpoint(pdev, pep, 0);
   292				cdnsp_halt_endpoint(pdev, pep, 1);
   293				break;
   294			}
   295	
   296			ret = cdnsp_halt_endpoint(pdev, pep, set);
   297			break;
   298		default:
   299			dev_warn(pdev->dev, "WARN Incorrect wValue %04x\n", wValue);
   300			return -EINVAL;
   301		}
   302	
   303		return ret;
   304	}
   305	
 > 306	int cdnsp_ep0_handle_feature(struct cdnsp_device *pdev,
   307				     struct usb_ctrlrequest *ctrl,
   308				     int set)
   309	{
   310		switch (ctrl->bRequestType & USB_RECIP_MASK) {
   311		case USB_RECIP_DEVICE:
   312			return cdnsp_ep0_handle_feature_device(pdev, ctrl, set);
   313		case USB_RECIP_INTERFACE:
   314			return cdnsp_ep0_handle_feature_intf(pdev, ctrl, set);
   315		case USB_RECIP_ENDPOINT:
   316			return cdnsp_ep0_handle_feature_endpoint(pdev, ctrl, set);
   317		default:
   318			return -EINVAL;
   319		}
   320	}
   321	

---
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: 75330 bytes --]

  reply	other threads:[~2020-06-26  9:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26  4:54 [PATCH RFC 0/5] Introduced new Cadence USBSSP DRD Driver Pawel Laszczak
2020-06-26  4:54 ` [PATCH RFC 1/5] dt-bindings: add binding for CDNSP-DRD controller Pawel Laszczak
2020-06-29 22:03   ` Rob Herring
2020-06-30  8:19     ` Pawel Laszczak
2020-06-26  4:54 ` [PATCH RFC 2/5] usb:cdns3: Add pci to platform driver wrapper Pawel Laszczak
2020-06-26 11:40   ` Dan Carpenter
2020-06-26 15:10     ` Pawel Laszczak
2020-06-26 17:24       ` Dan Carpenter
2020-06-29  6:51         ` Pawel Laszczak
2020-06-26 13:43   ` Greg KH
2020-06-29 11:35     ` Pawel Laszczak
2020-06-29 11:43       ` Greg KH
2020-06-26  4:54 ` [PATCH RFC 3/5] usb: cdnsp: Device side header file for CDNSP driver Pawel Laszczak
2020-06-26  4:54 ` [PATCH RFC 4/5] usb: cdnsp: usb:cdns3 Add main part of Cadence USBSSP DRD Driver Pawel Laszczak
2020-06-26  9:04   ` kernel test robot [this message]
2020-06-29 10:16   ` Dan Carpenter
2020-07-02  3:48     ` Pawel Laszczak
2020-06-26  4:54 ` [PATCH RFC 5/5] usb: cdnsp: Add tracepoints for CDNSP driver Pawel Laszczak
2020-06-26  6:52 ` [PATCH RFC 0/5] Introduced new Cadence USBSSP DRD Driver Felipe Balbi
2020-06-26  7:19   ` Pawel Laszczak
2020-06-29  3:41     ` Peter Chen
2020-06-29  4:31       ` gregkh
2020-06-29 11:20         ` Pawel Laszczak
2020-06-29 11:43           ` gregkh
2020-09-22 13:06         ` Pawel Laszczak
2020-09-23  2:56           ` Peter Chen
2020-09-23  3:37             ` Pawel Laszczak

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=202006261604.lJr8bFa2%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.