From: kernel test robot <lkp@intel.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Jessica Zhang <quic_jesszhan@quicinc.com>
Subject: drivers/gpu/drm/msm/msm_io_utils.c:65:31: sparse: sparse: incorrect type in return expression (different address spaces)
Date: Tue, 5 Apr 2022 20:49:45 +0800 [thread overview]
Message-ID: <202204052038.RxcTSgob-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3123109284176b1532874591f7c81f3837bbdc17
commit: d89e5028346bd80f79c3073d132123e7a17e1177 drm/msm: move utility functions from msm_drv.c
date: 7 weeks ago
config: sparc64-randconfig-s031-20220405 (https://download.01.org/0day-ci/archive/20220405/202204052038.RxcTSgob-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d89e5028346bd80f79c3073d132123e7a17e1177
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d89e5028346bd80f79c3073d132123e7a17e1177
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash drivers/gpu/drm/msm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/msm/msm_io_utils.c:65:31: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] __iomem * @@ got void * @@
drivers/gpu/drm/msm/msm_io_utils.c:65:31: sparse: expected void [noderef] __iomem *
drivers/gpu/drm/msm/msm_io_utils.c:65:31: sparse: got void *
drivers/gpu/drm/msm/msm_io_utils.c:74:31: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] __iomem * @@ got void * @@
drivers/gpu/drm/msm/msm_io_utils.c:74:31: sparse: expected void [noderef] __iomem *
drivers/gpu/drm/msm/msm_io_utils.c:74:31: sparse: got void *
vim +65 drivers/gpu/drm/msm/msm_io_utils.c
49
50 static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name,
51 bool quiet, phys_addr_t *psize)
52 {
53 struct resource *res;
54 unsigned long size;
55 void __iomem *ptr;
56
57 if (name)
58 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name);
59 else
60 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
61
62 if (!res) {
63 if (!quiet)
64 DRM_DEV_ERROR(&pdev->dev, "failed to get memory resource: %s\n", name);
> 65 return ERR_PTR(-EINVAL);
66 }
67
68 size = resource_size(res);
69
70 ptr = devm_ioremap(&pdev->dev, res->start, size);
71 if (!ptr) {
72 if (!quiet)
73 DRM_DEV_ERROR(&pdev->dev, "failed to ioremap: %s\n", name);
74 return ERR_PTR(-ENOMEM);
75 }
76
77 if (psize)
78 *psize = size;
79
80 return ptr;
81 }
82
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-04-06 0:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202204052038.RxcTSgob-lkp@intel.com \
--to=lkp@intel.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_jesszhan@quicinc.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®