Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3358705iob; Mon, 16 May 2022 20:35:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhfEMke1/v0RUxeg66oR+FfkCGqe4CVR3WfK/v0Fq10J0IZj2N/+d7KF81pjJ+afJbnL15 X-Received: by 2002:a17:906:7952:b0:6fe:1e0b:6343 with SMTP id l18-20020a170906795200b006fe1e0b6343mr12170324ejo.337.1652758513867; Mon, 16 May 2022 20:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652758513; cv=none; d=google.com; s=arc-20160816; b=b/BOD4jt5HX52LtBC7ozyyyX09KgN31Q734yyNz5TwJJ11uGVLMFwhpAy+D70KsN7g OHYQUmXxCXohvj0fe4wg3C2RfSE2Wv/X9/Z8pepwtlU80V154LPAax7YjqpzykUwDyQL 0Jv63jBhy994ughXHToIQiC0dsOu0NmXxvM1+5i5w89j3iOyE1koEXK5ljvrjPec1QMU tBxc6FZaV50s+odYSGkr2A8T9ff72ywsvkS4UcByTCUqf74l2hNffoacBG5UBhl8hJLS n0TydyTf+qLosILeQIRnh1uXBAdFScLq7++5VyTQuiNPdWrr7IRDdFDKvfl9MAMtp1+P JH8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EUNw+uqY+UIoIFkP1JVTY2lDflzfdwMMDrhdEGnuwnE=; b=B7VK0ABQ0Q+1xaZ3MZSnDTPD13wzYXElZGt3gjvyaHtyQhgpA2+YHWroy08Ts0z8M6 F+EEGyf4ZQ/63txRx0oz3VaS61VxjyV3T/aLxGg57nytpKyjN9lLfsYb4iNRa2IPS4rM a94KIsXFsHsr6LuiUepQ4jx6p9Zdw5fR+GxG1/gTSJZhvhvUBkrSiHdHmMuALphKODHQ JFD2ocVaN1n5YVG90d1kzHEDVCoaqGBAldHbjeja5O3426EYX5iugvgASCP8Xa35L9Vc 3XP6YCuLa4TfGzbH+8yQL0pll+Ds9oZqy+vPpao63GaPtGOau7syn7yRwZ2zYFwZ11HP /eUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="HcF6/I8C"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u18-20020a1709067d1200b006df7eafe421si1480541ejo.127.2022.05.16.20.34.48; Mon, 16 May 2022 20:35:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="HcF6/I8C"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344884AbiEPS3Z (ORCPT + 99 others); Mon, 16 May 2022 14:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344888AbiEPS25 (ORCPT ); Mon, 16 May 2022 14:28:57 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8516A3DDC3; Mon, 16 May 2022 11:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652725735; x=1684261735; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=R32de3wh6TrT1gnFG0UBXSG3pbisE1mnMN7/ySz5rO0=; b=HcF6/I8CkV2OqL4TjNOWuDtlWXwngIIpKvXHRJmLkOk5MtMQXn1wf2s0 yHBuAKlMYfaw4KyHA0rr1gBB+LlHr9rXeRMBNwGDlSnHI9KAKNhJhuvqR 9gxcyRtD2w4oVVp0eOMjziirLQsilqow+z/Aa/r/6SPVmENaeP8JpkPT2 Jt659fmXmPiDTEzSwaCXbpGgSVj4D/u7Eu0LJ3IbP+Lf2nSWgbYvv8xNX FXKv61h0xQJg+XGdvO3KWw/dDeE9YVOBro8hj3v8EMTF5RTuNrsGfX9uj 9ntqCZAA0dHBKkW26eNUdgIfE61u/C0pN91cU+YiqaW81VTC/IsgEUNx2 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10349"; a="357336972" X-IronPort-AV: E=Sophos;i="5.91,230,1647327600"; d="scan'208";a="357336972" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2022 11:28:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,230,1647327600"; d="scan'208";a="574151701" Received: from lkp-server02.sh.intel.com (HELO 242b25809ac7) ([10.239.97.151]) by fmsmga007.fm.intel.com with ESMTP; 16 May 2022 11:28:42 -0700 Received: from kbuild by 242b25809ac7 with local (Exim 4.95) (envelope-from ) id 1nqfSU-0000G2-5F; Mon, 16 May 2022 18:28:42 +0000 Date: Tue, 17 May 2022 02:28:21 +0800 From: kernel test robot To: Neal Liu , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Joel Stanley , Andrew Jeffery , Felipe Balbi , Sumit Semwal , Christian =?iso-8859-1?Q?K=F6nig?= , Geert Uytterhoeven , Li Yang Cc: kbuild-all@lists.01.org, Neal Liu , linux-aspeed@lists.ozlabs.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, BMC-SW@aspeedtech.com Subject: Re: [PATCH 1/3] usb: gadget: add Aspeed ast2600 udc driver Message-ID: <202205170249.uTUi0uir-lkp@intel.com> References: <20220513065728.857722-2-neal_liu@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220513065728.857722-2-neal_liu@aspeedtech.com> X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Neal, I love your patch! Perhaps something to improve: [auto build test WARNING on usb/usb-testing] [also build test WARNING on robh/for-next v5.18-rc7] [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] url: https://github.com/intel-lab-lkp/linux/commits/Neal-Liu/add-Aspeed-udc-driver-for-ast2600/20220513-150314 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing config: mips-randconfig-s032-20220516 (https://download.01.org/0day-ci/archive/20220517/202205170249.uTUi0uir-lkp@intel.com/config) compiler: mipsel-linux-gcc (GCC) 11.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/intel-lab-lkp/linux/commit/272ae26f9fe89f60d584cf445431d0fa566eb24b git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Neal-Liu/add-Aspeed-udc-driver-for-ast2600/20220513-150314 git checkout 272ae26f9fe89f60d584cf445431d0fa566eb24b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash drivers/usb/gadget/udc/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) command-line: note: in included file: builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined builtin:0:0: sparse: this was the original definition builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined builtin:0:0: sparse: this was the original definition builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined builtin:0:0: sparse: this was the original definition builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined builtin:0:0: sparse: this was the original definition drivers/usb/gadget/udc/aspeed_udc.c:1009:34: sparse: sparse: restricted __le16 degrades to integer drivers/usb/gadget/udc/aspeed_udc.c:1037:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *src @@ got struct usb_ctrlrequest *creq @@ drivers/usb/gadget/udc/aspeed_udc.c:1037:32: sparse: expected void const volatile [noderef] __iomem *src drivers/usb/gadget/udc/aspeed_udc.c:1037:32: sparse: got struct usb_ctrlrequest *creq >> drivers/usb/gadget/udc/aspeed_udc.c:1066:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le16 [addressable] [usertype] wValue @@ drivers/usb/gadget/udc/aspeed_udc.c:1066:25: sparse: expected unsigned int [usertype] val drivers/usb/gadget/udc/aspeed_udc.c:1066:25: sparse: got restricted __le16 [addressable] [usertype] wValue drivers/usb/gadget/udc/aspeed_udc.c:1070:37: sparse: sparse: restricted __le16 degrades to integer drivers/usb/gadget/udc/aspeed_udc.c:1075:37: sparse: sparse: restricted __le16 degrades to integer drivers/usb/gadget/udc/aspeed_udc.c:1518:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct usb_ctrlrequest *creq @@ got void [noderef] __iomem * @@ drivers/usb/gadget/udc/aspeed_udc.c:1518:19: sparse: expected struct usb_ctrlrequest *creq drivers/usb/gadget/udc/aspeed_udc.c:1518:19: sparse: got void [noderef] __iomem * drivers/usb/gadget/udc/aspeed_udc.c:619:38: sparse: sparse: cast truncates bits from constant value (80 becomes 0) drivers/usb/gadget/udc/aspeed_udc.c:625:12: sparse: sparse: context imbalance in 'ast_udc_ep_queue' - different lock contexts for basic block vim +1066 drivers/usb/gadget/udc/aspeed_udc.c 1027 1028 static void ast_udc_ep0_handle_setup(struct ast_udc_dev *udc) 1029 { 1030 struct ast_udc_ep *ep = &udc->ep[0]; 1031 struct ast_udc_request *req; 1032 struct usb_ctrlrequest crq; 1033 int req_num = 0; 1034 u16 ep_num = 0; 1035 int rc; 1036 1037 memcpy_fromio(&crq, udc->creq, sizeof(crq)); 1038 1039 SETUP_DBG(udc, "SETEUP packet: %02x/%02x/%04x/%04x/%04x\n", 1040 crq.bRequestType, crq.bRequest, le16_to_cpu(crq.wValue), 1041 le16_to_cpu(crq.wIndex), le16_to_cpu(crq.wLength)); 1042 1043 /* 1044 * Cleanup ep0 request(s) in queue because 1045 * there is a new control setup comes. 1046 */ 1047 list_for_each_entry(req, &udc->ep[0].queue, queue) { 1048 req_num++; 1049 EP_DBG(ep, "there is req %p in ep0 queue !\n", req); 1050 } 1051 1052 if (req_num) 1053 ast_udc_nuke(&udc->ep[0], -ETIMEDOUT); 1054 1055 udc->ep[0].dir_in = crq.bRequestType & USB_DIR_IN; 1056 1057 if ((crq.bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) { 1058 switch (crq.bRequest) { 1059 case USB_REQ_SET_ADDRESS: 1060 if (ast_udc_read(udc, AST_UDC_STS) & UDC_STS_HIGHSPEED) 1061 udc->gadget.speed = USB_SPEED_HIGH; 1062 else 1063 udc->gadget.speed = USB_SPEED_FULL; 1064 1065 SETUP_DBG(udc, "set addr: 0x%x\n", crq.wValue); > 1066 ast_udc_write(udc, crq.wValue, AST_UDC_CONFIG); 1067 goto req_complete; 1068 1069 case USB_REQ_CLEAR_FEATURE: 1070 ep_num = crq.wIndex & USB_ENDPOINT_NUMBER_MASK; 1071 SETUP_DBG(udc, "ep%d: CLEAR FEATURE\n", ep_num); 1072 goto req_driver; 1073 1074 case USB_REQ_SET_FEATURE: 1075 ep_num = crq.wIndex & USB_ENDPOINT_NUMBER_MASK; 1076 SETUP_DBG(udc, "ep%d: SET FEATURE\n", ep_num); 1077 goto req_driver; 1078 1079 case USB_REQ_GET_STATUS: 1080 ast_udc_getstatus(udc); 1081 return; 1082 1083 default: 1084 goto req_driver; 1085 } 1086 1087 } 1088 1089 req_driver: 1090 if (udc->driver) { 1091 SETUP_DBG(udc, "Forwarding %s to gadget...\n", 1092 udc->gadget.name); 1093 1094 spin_unlock(&udc->lock); 1095 rc = udc->driver->setup(&udc->gadget, &crq); 1096 spin_lock(&udc->lock); 1097 1098 } else 1099 SETUP_DBG(udc, "No gadget for request !\n"); 1100 1101 if (rc >= 0) 1102 return; 1103 1104 /* Stall if gadget failed */ 1105 SETUP_DBG(udc, "Stalling, rc:0x%x\n", rc); 1106 ast_udc_write(udc, ast_udc_read(udc, AST_UDC_EP0_CTRL) | EP0_STALL, 1107 AST_UDC_EP0_CTRL); 1108 return; 1109 1110 req_complete: 1111 SETUP_DBG(udc, "ep%d: Sending IN status without data\n", ep_num); 1112 ast_udc_write(udc, EP0_TX_BUFF_RDY, AST_UDC_EP0_CTRL); 1113 } 1114 -- 0-DAY CI Kernel Test Service https://01.org/lkp