Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2832198iob; Mon, 16 May 2022 07:12:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmZq/Vk9S7gR14yMlf58kV6jZhm/qto7EHLoFO54w+bB3doh08mLcwMgX70Eggpyfb3+wd X-Received: by 2002:a17:902:bb90:b0:156:2c05:b34f with SMTP id m16-20020a170902bb9000b001562c05b34fmr18181673pls.53.1652710341208; Mon, 16 May 2022 07:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652710341; cv=none; d=google.com; s=arc-20160816; b=VuyPw1XByvTvoWfSefo++yWt6Mu090fRCLVJ2Kfy0PipcV+1z96/RWCTdlCDkAkUjT NPzPv7MJTJGkAjTz17Uf6/lIgQltr/wqv3+F/Si1fAvPKFZvJq7aEfgz4hQfLtznNhLN 5ievTf4ZkUnJDV85pdgtgAphPFBu8WcmZsq/u4WzPh8sVI4RGNW+yrj5cvPccsTOMhEe uAYkq4PeTvk1ryL4bQgrowaki78i4wfQyNM1UjuK98JdNvTyHBJgRIQcfhukkcj2Rs4v rB5L97wXg8YvTRnq0TUfTZrj227mYwMNx46IUO8bwLfte9vnZ4Ik5np7mQH+9EkosbBw fKYg== 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=KAB4ksOoaIhzkSJYCl55+5ykhliZm/duObvMgvjQljM=; b=bb/E7jd5+o3Q0OKNVa8glYUGQy1Fz75TAPn3MzkkfpBbZgJH7bdgSfJtOJ+BlVQBq1 ncDIAGfXUwYPJi1e0UFyzVbkzuQuVU4LoT+bNHfh0T5rW2V1BmT2Px+9Wn0bg0TriLVA zDXN1J1/r+fx91ROBy279eK5lYM2rUC44CFLYi6qYHXQYqaiwiRWIIsZu504ajmxuV2X JDDg+jMHUxO+a9hM5ZLN05x7iqNMKtM9e3ddFiCoNb9Ts36XWiv1eYJIiFNbA2aDyk39 oEwevBhU9TtjknoGGXrAwRdVmqIJRefToROW8WpLsbhQT5p7eioaaetZ+SCpSxKYmck8 hzIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="kAxbo/i4"; 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 u9-20020a63a909000000b003ab54eacbbdsi12443826pge.255.2022.05.16.07.12.09; Mon, 16 May 2022 07:12:21 -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="kAxbo/i4"; 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 S242527AbiEPKWu (ORCPT + 99 others); Mon, 16 May 2022 06:22:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242452AbiEPKW1 (ORCPT ); Mon, 16 May 2022 06:22:27 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B1CCDF2A; Mon, 16 May 2022 03:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652696539; x=1684232539; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=rQd2aZJvrRMvYuDZkI9jNLzYYyg/Ub/0/Ce4xmZSbro=; b=kAxbo/i45sMw3QnPc84qdl5rmC81evQusEKcWDYS8tZ6WOvlBW77wjPb if27pNVejm8t680E+KkhuAHwxg3sLCV3Qg+B3vygVmxjXiF6PyPK2p5YK /h5YBPXdyuQ+xLXSJmi8nnWLH5MyWCgxepoldZBmgEfMeRXPa9YE/F+75 XmplKIyzhkKZLg8SjhihV5YudIYLhuYPgD71wROp3zZ2fTqfxnv5wfC1k gAQOrtAerZqskavJ7WKyYcgCdwBmCXG1YzLcKMohcXSXWEX/NcXVCZJDR uZx/ttTrupzvtfTO8+11pS+qxC2KFmVPDYT4bear8VVnzRdsvAqGFXUsV w==; X-IronPort-AV: E=McAfee;i="6400,9594,10348"; a="270742685" X-IronPort-AV: E=Sophos;i="5.91,229,1647327600"; d="scan'208";a="270742685" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2022 03:22:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,229,1647327600"; d="scan'208";a="660043145" Received: from lkp-server01.sh.intel.com (HELO d1462bc4b09b) ([10.239.97.150]) by FMSMGA003.fm.intel.com with ESMTP; 16 May 2022 03:22:13 -0700 Received: from kbuild by d1462bc4b09b with local (Exim 4.95) (envelope-from ) id 1nqXrh-0002KB-0L; Mon, 16 May 2022 10:22:13 +0000 Date: Mon, 16 May 2022 18:21:55 +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: <202205161801.OB6kCtEa-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 next-20220513] [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: openrisc-randconfig-s031-20220516 (https://download.01.org/0day-ci/archive/20220516/202205161801.OB6kCtEa-lkp@intel.com/config) compiler: or1k-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=openrisc 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 >>) 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 *addr @@ got struct usb_ctrlrequest *creq @@ drivers/usb/gadget/udc/aspeed_udc.c:1037:32: sparse: expected void const volatile [noderef] __iomem *addr 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] value @@ got restricted __le16 [addressable] [usertype] wValue @@ drivers/usb/gadget/udc/aspeed_udc.c:1066:25: sparse: expected unsigned int [usertype] value 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 +1037 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