From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98EE5C433EF for ; Sun, 24 Jul 2022 23:09:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 894978E0002; Sun, 24 Jul 2022 19:09:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8441E8E0001; Sun, 24 Jul 2022 19:09:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E4938E0002; Sun, 24 Jul 2022 19:09:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 5A70C8E0001 for ; Sun, 24 Jul 2022 19:09:39 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2389A802AD for ; Sun, 24 Jul 2022 23:09:39 +0000 (UTC) X-FDA: 79723537278.25.C502579 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf13.hostedemail.com (Postfix) with ESMTP id 9FED5200B5 for ; Sun, 24 Jul 2022 23:09:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658704177; x=1690240177; h=date:from:to:cc:subject:message-id:mime-version; bh=jRcze3/aaKbSptljyJPwiAEIvQcPfQNELJiO2E0IWlw=; b=I5b1DSPfy7cYNwleFNfawvI9Kn1daSUUc0zsfnlGj9DQ957JelaZZMGg AiVaKF3TcU3vWEhH1xsUQK4KUleA9jK9ChJBxxzq1B+j7lfmkP/Gmapie JKeGecIOlQ4tZoC6+BqaecueEANIith5NBsqvaMGUUgugdL7wncmEndU+ H4u4QoEgHXETQk4Lf6aA27C/JHJxeauaDlEcCxwbGnidmvXKvaMAAwyOt a5qpOrAdR7GGdcj9HWs2bIyA7lLqMptoxeZ78bzbUOg32yedz5Bfq31Ib cMU29PhnF5uDutHKaiHIhsKqFp1e1iD/dUKbSuSektVRpvHOosiwiH9+A w==; X-IronPort-AV: E=McAfee;i="6400,9594,10418"; a="267968887" X-IronPort-AV: E=Sophos;i="5.93,191,1654585200"; d="scan'208";a="267968887" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2022 16:09:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,191,1654585200"; d="scan'208";a="632156497" Received: from lkp-server01.sh.intel.com (HELO e0eace57cfef) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 24 Jul 2022 16:09:33 -0700 Received: from kbuild by e0eace57cfef with local (Exim 4.96) (envelope-from ) id 1oFkj7-0004OG-0C; Sun, 24 Jul 2022 23:09:33 +0000 Date: Mon, 25 Jul 2022 07:08:40 +0800 From: kernel test robot To: Timo Alho Cc: kbuild-all@lists.01.org, Linux Memory Management List , Thierry Reding , Mikko Perttunen Subject: [linux-next:master 4332/12552] drivers/firmware/tegra/bpmp.c:204:17: sparse: sparse: incorrect type in argument 2 (different address spaces) Message-ID: <202207250715.8g5iCHHS-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658704178; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=2sZJz2LXWOSymGwJmrkR5f2mJMNOEKHNMk7KMeJaiyk=; b=pRPZxy2v0LIFbQGxP9qW+S3ZSA792h6ko7eFaU9YpjDCoPBcFrd7552XOtXy5aG5syfdXM l7nWgab8UPTq45dRQEG6Tfx6DIjtgA/ZjMkQRE/2CQIv5h2hkOo5kkaf4wiRJFuVmlzdOQ HYWuDn/amdlng60SNKvz+zA43qaVV0E= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=I5b1DSPf; spf=none (imf13.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.151) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658704178; a=rsa-sha256; cv=none; b=dseC7pHdLvmTa6NgAVQmW3avTdIOjWUJ59u/bWbkbVVA0hia/OFnycEMF5KqsmYEg6rG0R ZAbbuMMXjNd/YNv+KDlcma/fxr6fwwqsXBxcCye9UUIFYsuGpOB7s3IuP4CAGeaHsnIaPL gPIhxSLcsGNOHCCZmDEc4iC3aWhqndI= X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 9FED5200B5 X-Stat-Signature: be63tpc7o995ep7rxd9f9cfab9azafi6 X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=I5b1DSPf; spf=none (imf13.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.151) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-HE-Tag: 1658704177-382728 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 18c107a1f120d095404d141dfad8f594bdc44020 commit: a4740b148a04dc60e14fe6a1dfe216d3bae214fd [4332/12552] firmware: tegra: bpmp: Do only aligned access to IPC memory area config: arm-randconfig-s042-20220721 (https://download.01.org/0day-ci/archive/20220725/202207250715.8g5iCHHS-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a4740b148a04dc60e14fe6a1dfe216d3bae214fd git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout a4740b148a04dc60e14fe6a1dfe216d3bae214fd # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/firmware/tegra/ drivers/gpu/drm/qxl/ drivers/gpu/drm/ttm/ drivers/video/fbdev/aty/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/firmware/tegra/bpmp.c:204:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *from @@ got unsigned char * @@ drivers/firmware/tegra/bpmp.c:204:17: sparse: expected void const volatile [noderef] __iomem *from drivers/firmware/tegra/bpmp.c:204:17: sparse: got unsigned char * >> drivers/firmware/tegra/bpmp.c:248:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *to @@ got unsigned char * @@ drivers/firmware/tegra/bpmp.c:248:17: sparse: expected void volatile [noderef] __iomem *to drivers/firmware/tegra/bpmp.c:248:17: sparse: got unsigned char * drivers/firmware/tegra/bpmp.c:423:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *to @@ got unsigned char * @@ drivers/firmware/tegra/bpmp.c:423:17: sparse: expected void volatile [noderef] __iomem *to drivers/firmware/tegra/bpmp.c:423:17: sparse: got unsigned char * drivers/firmware/tegra/bpmp.c:505:53: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] mrq @@ got restricted __le32 [usertype] @@ drivers/firmware/tegra/bpmp.c:505:53: sparse: expected unsigned int [usertype] mrq drivers/firmware/tegra/bpmp.c:505:53: sparse: got restricted __le32 [usertype] vim +204 drivers/firmware/tegra/bpmp.c 197 198 static ssize_t __tegra_bpmp_channel_read(struct tegra_bpmp_channel *channel, 199 void *data, size_t size, int *ret) 200 { 201 int err; 202 203 if (data && size > 0) > 204 memcpy_fromio(data, channel->ib->data, size); 205 206 err = tegra_bpmp_ack_response(channel); 207 if (err < 0) 208 return err; 209 210 *ret = channel->ib->code; 211 212 return 0; 213 } 214 215 static ssize_t tegra_bpmp_channel_read(struct tegra_bpmp_channel *channel, 216 void *data, size_t size, int *ret) 217 { 218 struct tegra_bpmp *bpmp = channel->bpmp; 219 unsigned long flags; 220 ssize_t err; 221 int index; 222 223 index = tegra_bpmp_channel_get_thread_index(channel); 224 if (index < 0) { 225 err = index; 226 goto unlock; 227 } 228 229 spin_lock_irqsave(&bpmp->lock, flags); 230 err = __tegra_bpmp_channel_read(channel, data, size, ret); 231 clear_bit(index, bpmp->threaded.allocated); 232 spin_unlock_irqrestore(&bpmp->lock, flags); 233 234 unlock: 235 up(&bpmp->threaded.lock); 236 237 return err; 238 } 239 240 static ssize_t __tegra_bpmp_channel_write(struct tegra_bpmp_channel *channel, 241 unsigned int mrq, unsigned long flags, 242 const void *data, size_t size) 243 { 244 channel->ob->code = mrq; 245 channel->ob->flags = flags; 246 247 if (data && size > 0) > 248 memcpy_toio(channel->ob->data, data, size); 249 250 return tegra_bpmp_post_request(channel); 251 } 252 -- 0-DAY CI Kernel Test Service https://01.org/lkp