Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp11525101ybl; Fri, 27 Dec 2019 16:00:01 -0800 (PST) X-Google-Smtp-Source: APXvYqz6524QfyJ+M2F5AX/zpNbymFNQFekUiB9fjXulJGFQmpWfnBn6TMuPyfA3TfYs9+oKC4vi X-Received: by 2002:a9d:588c:: with SMTP id x12mr57813403otg.2.1577491201344; Fri, 27 Dec 2019 16:00:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577491201; cv=none; d=google.com; s=arc-20160816; b=arcAO6A1BTfCd94COOUn0cVKgK51zxeibMZ6XF+XtAsnjUCW4fcH2tNfDBFRtBpxej JRLToVLa+LiiFgeSyEJTFRtsgz/dt3jaon+BjjnQ0n+8JE+TMh6dHQhuLj2ww9FuWYv4 jMb8swzlMZwhV4+cWhvxW+d8F6IVK0lvF6dOecNrgv8msYgaA+yLcG1lbjSOPVk50pCj z3Q0PKd0+PNE9Rz0N1uNDk8GhEN9QFa3KrNgyBexQ835vKMMmNZ5CnvSn3CYm8YUkmJS n78SIttzIormmPF/azLUtTcnHRNneA1PxuM3u2rqs4mId3Ww1vw/+0YTCjQ4HY189dpD 7uPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=yZCqwN+r4hkY3rENcGJfYvGT2ayOTxGeJeJv1fIogDc=; b=x68h17wlmGYClPZ64Sl5RS3hjN/mYYcz2k+yajvLZAaQ+LTp7JLxx+ZH1rsz5hoVVf lZw8rkuXAfrmnvvSDZ18iyujr7KRNXc2GxP0XaB2M4ijCuHS+/36HnvGQkEx9M0wJLf5 vzk6t3RuKRj08qmIZz6LSnNcpPenYTvpjI4ocbgojcWn4Q7CLVLmr+7QegLSJ3U9t35M y41dWCGOlG5G2JnyfTSNfzXGfAW9morNVpN84oD9GvWmp8KE8fR2ZqNnuoeBZg+Sg1pv iFB81b9TE1MMcvFgaZCou6ZyJkewhP610SXBMNw/x7lHa8c4OKg7wnnO+ub9Ppx1gOD+ np6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f25si8639402oti.244.2019.12.27.15.59.24; Fri, 27 Dec 2019 16:00:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726195AbfL0X5I (ORCPT + 99 others); Fri, 27 Dec 2019 18:57:08 -0500 Received: from mga01.intel.com ([192.55.52.88]:43813 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725306AbfL0X5I (ORCPT ); Fri, 27 Dec 2019 18:57:08 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Dec 2019 15:57:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,364,1571727600"; d="scan'208";a="418456292" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by fmsmga005.fm.intel.com with ESMTP; 27 Dec 2019 15:57:05 -0800 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1ikzTd-0001sD-79; Sat, 28 Dec 2019 07:57:05 +0800 Date: Sat, 28 Dec 2019 07:56:48 +0800 From: kbuild test robot To: Sanjay R Mehta Cc: kbuild-all@lists.01.org, vkoul@kernel.org, dan.j.williams@intel.com, gregkh@linuxfoundation.org, Gary.Hook@amd.com, Nehal-bakulchandra.Shah@amd.com, Shyam-sundar.S-k@amd.com, davem@davemloft.net, mchehab+samsung@kernel.org, robh@kernel.org, Jonathan.Cameron@huawei.com, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, Sanjay R Mehta Subject: Re: [PATCH v2 1/3] dmaengine: ptdma: Initial driver for the AMD PassThru DMA engine Message-ID: <201912280738.zotyIgEi%lkp@intel.com> References: <1577458047-109654-1-git-send-email-Sanju.Mehta@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1577458047-109654-1-git-send-email-Sanju.Mehta@amd.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sanjay, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.5-rc3 next-20191220] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Sanjay-R-Mehta/Add-AMD-PassThru-DMA-Engine-driver/20191227-234539 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 46cf053efec6a3a5f343fead837777efe8252a46 reproduce: # apt-get install sparse # sparse version: v0.6.1-129-g341daf20-dirty make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> drivers/dma/ptdma/ptdma-dev.c:151:25: sparse: sparse: cast from restricted __le32 >> drivers/dma/ptdma/ptdma-dev.c:151:23: sparse: sparse: incorrect type in assignment (different base types) >> drivers/dma/ptdma/ptdma-dev.c:151:23: sparse: expected unsigned int [usertype] >> drivers/dma/ptdma/ptdma-dev.c:151:23: sparse: got restricted __le32 [usertype] drivers/dma/ptdma/ptdma-dev.c:180:21: sparse: sparse: incorrect type in assignment (different base types) >> drivers/dma/ptdma/ptdma-dev.c:180:21: sparse: expected restricted __le32 [addressable] [assigned] [usertype] length >> drivers/dma/ptdma/ptdma-dev.c:180:21: sparse: got unsigned long long [usertype] src_len drivers/dma/ptdma/ptdma-dev.c:182:21: sparse: sparse: incorrect type in assignment (different base types) >> drivers/dma/ptdma/ptdma-dev.c:182:21: sparse: expected restricted __le32 [addressable] [assigned] [usertype] src_lo >> drivers/dma/ptdma/ptdma-dev.c:182:21: sparse: got unsigned int [usertype] drivers/dma/ptdma/ptdma-dev.c:185:21: sparse: sparse: incorrect type in assignment (different base types) >> drivers/dma/ptdma/ptdma-dev.c:185:21: sparse: expected restricted __le32 [addressable] [assigned] [usertype] dst_lo drivers/dma/ptdma/ptdma-dev.c:185:21: sparse: got unsigned int [usertype] vim +151 drivers/dma/ptdma/ptdma-dev.c 132 133 static int pt_core_execute_cmd(struct ptdma_desc *desc, 134 struct pt_cmd_queue *cmd_q) 135 { 136 u32 *mp; 137 __le32 *dp; 138 u32 tail; 139 int i; 140 int ret = 0; 141 142 if (desc->dw0.soc) { 143 desc->dw0.ioc = 1; 144 desc->dw0.soc = 0; 145 } 146 mutex_lock(&cmd_q->q_mutex); 147 148 mp = (u32 *)&cmd_q->qbase[cmd_q->qidx]; 149 dp = (__le32 *)desc; 150 for (i = 0; i < 8; i++) > 151 mp[i] = cpu_to_le32(dp[i]); /* handle endianness */ 152 153 cmd_q->qidx = (cmd_q->qidx + 1) % cmd_queue_length; 154 155 /* The data used by this command must be flushed to memory */ 156 wmb(); 157 158 /* Write the new tail address back to the queue register */ 159 tail = lower_32_bits(cmd_q->qdma_tail + cmd_q->qidx * Q_DESC_SIZE); 160 iowrite32(tail, cmd_q->reg_tail_lo); 161 162 /* Turn the queue back on using our cached control register */ 163 iowrite32(cmd_q->qcontrol | CMD_Q_RUN, cmd_q->reg_control); 164 mutex_unlock(&cmd_q->q_mutex); 165 166 return ret; 167 } 168 169 int pt_core_perform_passthru(struct pt_cmd_queue *cmd_q, 170 struct pt_passthru_engine *pt_engine) 171 { 172 struct ptdma_desc desc; 173 174 cmd_q->cmd_error = 0; 175 176 memset(&desc, 0, Q_DESC_SIZE); 177 178 desc.dw0.val = CMD_DESC_DW0_VAL; 179 > 180 desc.length = pt_engine->src_len; 181 > 182 desc.src_lo = lower_32_bits(pt_engine->src_dma); 183 desc.dw3.src_hi = upper_32_bits(pt_engine->src_dma); 184 > 185 desc.dst_lo = lower_32_bits(pt_engine->dst_dma); 186 desc.dw5.dst_hi = upper_32_bits(pt_engine->dst_dma); 187 188 return pt_core_execute_cmd(&desc, cmd_q); 189 } 190 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation