linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/gpio/gpio-sa1100.c:104:21: sparse: sparse: cast removes address space '__iomem' of expression
Date: Tue, 18 Aug 2020 01:09:00 +0800	[thread overview]
Message-ID: <202008180154.ufveTp0c%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7713 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date:   9 weeks ago
config: arm-randconfig-s031-20200816 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.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.2-180-g49f7e13a-dirty
        git checkout 670d0a4b10704667765f7d18f7592993d02783aa
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm 

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/gpio/gpio-sa1100.c:104:21: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpio/gpio-sa1100.c:104:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void [noderef] __iomem *membase @@     got void * @@
>> drivers/gpio/gpio-sa1100.c:104:21: sparse:     expected void [noderef] __iomem *membase
   drivers/gpio/gpio-sa1100.c:104:21: sparse:     got void *
>> drivers/gpio/gpio-sa1100.c:115:25: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void *base @@     got void [noderef] __iomem *membase @@
   drivers/gpio/gpio-sa1100.c:115:25: sparse:     expected void *base
>> drivers/gpio/gpio-sa1100.c:115:25: sparse:     got void [noderef] __iomem *membase
>> drivers/gpio/gpio-sa1100.c:121:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void * @@
>> drivers/gpio/gpio-sa1100.c:121:9: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpio/gpio-sa1100.c:121:9: sparse:     got void *
   drivers/gpio/gpio-sa1100.c:122:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void * @@
   drivers/gpio/gpio-sa1100.c:122:9: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpio/gpio-sa1100.c:122:9: sparse:     got void *
--
>> drivers/video/fbdev/sa1100fb.c:1041:37: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected char [noderef] __iomem *screen_base @@     got unsigned char [usertype] * @@
>> drivers/video/fbdev/sa1100fb.c:1041:37: sparse:     expected char [noderef] __iomem *screen_base
   drivers/video/fbdev/sa1100fb.c:1041:37: sparse:     got unsigned char [usertype] *
   drivers/video/fbdev/sa1100fb.c:1219:12: sparse: sparse: symbol 'sa1100fb_init' was not declared. Should it be static?
   drivers/video/fbdev/sa1100fb.c:1227:12: sparse: sparse: symbol 'sa1100fb_setup' was not declared. Should it be static?
   drivers/video/fbdev/sa1100fb.c:774:17: sparse: sparse: dereference of noderef expression
   drivers/video/fbdev/sa1100fb.c:775:17: sparse: sparse: dereference of noderef expression

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=670d0a4b10704667765f7d18f7592993d02783aa
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
vim +/__iomem +104 drivers/gpio/gpio-sa1100.c

f408c985cefc9b1 drivers/gpio/gpio-sa1100.c  Russell King            2011-12-18   91  
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31   92  static struct sa1100_gpio_chip sa1100_gpio_chip = {
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31   93  	.chip = {
45528e38173e7d8 arch/arm/mach-sa1100/gpio.c Dmitry Eremin-Solenikov 2008-04-10   94  		.label			= "gpio",
c65d1fd350fa28d drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31   95  		.get_direction		= sa1100_get_direction,
45528e38173e7d8 arch/arm/mach-sa1100/gpio.c Dmitry Eremin-Solenikov 2008-04-10   96  		.direction_input	= sa1100_direction_input,
45528e38173e7d8 arch/arm/mach-sa1100/gpio.c Dmitry Eremin-Solenikov 2008-04-10   97  		.direction_output	= sa1100_direction_output,
45528e38173e7d8 arch/arm/mach-sa1100/gpio.c Dmitry Eremin-Solenikov 2008-04-10   98  		.set			= sa1100_gpio_set,
45528e38173e7d8 arch/arm/mach-sa1100/gpio.c Dmitry Eremin-Solenikov 2008-04-10   99  		.get			= sa1100_gpio_get,
f408c985cefc9b1 drivers/gpio/gpio-sa1100.c  Russell King            2011-12-18  100  		.to_irq			= sa1100_to_irq,
45528e38173e7d8 arch/arm/mach-sa1100/gpio.c Dmitry Eremin-Solenikov 2008-04-10  101  		.base			= 0,
45528e38173e7d8 arch/arm/mach-sa1100/gpio.c Dmitry Eremin-Solenikov 2008-04-10  102  		.ngpio			= GPIO_MAX + 1,
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  103  	},
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31 @104  	.membase = (void *)&GPLR,
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  105  	.irqbase = IRQ_GPIO0,
45528e38173e7d8 arch/arm/mach-sa1100/gpio.c Dmitry Eremin-Solenikov 2008-04-10  106  };
45528e38173e7d8 arch/arm/mach-sa1100/gpio.c Dmitry Eremin-Solenikov 2008-04-10  107  
a0ea298d325616b drivers/gpio/gpio-sa1100.c  Dmitry Eremin-Solenikov 2015-01-15  108  /*
a0ea298d325616b drivers/gpio/gpio-sa1100.c  Dmitry Eremin-Solenikov 2015-01-15  109   * SA1100 GPIO edge detection for IRQs:
a0ea298d325616b drivers/gpio/gpio-sa1100.c  Dmitry Eremin-Solenikov 2015-01-15  110   * IRQs are generated on Falling-Edge, Rising-Edge, or both.
a0ea298d325616b drivers/gpio/gpio-sa1100.c  Dmitry Eremin-Solenikov 2015-01-15  111   * Use this instead of directly setting GRER/GFER.
a0ea298d325616b drivers/gpio/gpio-sa1100.c  Dmitry Eremin-Solenikov 2015-01-15  112   */
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  113  static void sa1100_update_edge_regs(struct sa1100_gpio_chip *sgc)
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  114  {
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31 @115  	void *base = sgc->membase;
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  116  	u32 grer, gfer;
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  117  
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  118  	grer = sgc->irqrising & sgc->irqmask;
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  119  	gfer = sgc->irqfalling & sgc->irqmask;
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  120  
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31 @121  	writel_relaxed(grer, base + R_GRER);
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  122  	writel_relaxed(gfer, base + R_GFER);
07242b248119a93 drivers/gpio/gpio-sa1100.c  Russell King            2016-08-31  123  }
a0ea298d325616b drivers/gpio/gpio-sa1100.c  Dmitry Eremin-Solenikov 2015-01-15  124  

:::::: The code at line 104 was first introduced by commit
:::::: 07242b248119a9388a67975aa7fae7c23afc7a07 gpio: sa1100: convert to use IO accessors

:::::: TO: Russell King <rmk+kernel@armlinux.org.uk>
:::::: CC: Linus Walleij <linus.walleij@linaro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36361 bytes --]

             reply	other threads:[~2020-08-17 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17 17:09 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-06-22 14:25 drivers/gpio/gpio-sa1100.c:104:21: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot

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=202008180154.ufveTp0c%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.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;
as well as URLs for NNTP newsgroup(s).