All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 4765/6512] drivers/iommu/sprd-iommu.c:456:42: sparse: sparse: Using plain integer as NULL pointer
Date: Tue, 23 Mar 2021 18:06:27 +0800	[thread overview]
Message-ID: <202103231825.jVCEFLAf-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   d949689e7383cd5271470f2b99dbe2fd3199bffd
commit: b23e4fc4e3faed0b8b604079c44a244da3ec941a [4765/6512] iommu: add Unisoc IOMMU basic driver
config: m68k-randconfig-s032-20210323 (attached as .config)
compiler: m68k-linux-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.3-277-gc089cd2d-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b23e4fc4e3faed0b8b604079c44a244da3ec941a
        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 b23e4fc4e3faed0b8b604079c44a244da3ec941a
        # 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=m68k 

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/iommu/sprd-iommu.c:456:42: sparse: sparse: Using plain integer as NULL pointer
   drivers/iommu/sprd-iommu.c: note: in included file (through arch/m68k/include/asm/io.h, include/linux/scatterlist.h, include/linux/dma-mapping.h):
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32

vim +456 drivers/iommu/sprd-iommu.c

   446	
   447	/*
   448	 * Clock is not required, access to some of IOMMUs is controlled by gate
   449	 * clk, enabled clocks for that kind of IOMMUs before accessing.
   450	 * Return 0 for success or no clocks found.
   451	 */
   452	static int sprd_iommu_clk_enable(struct sprd_iommu_device *sdev)
   453	{
   454		struct clk *eb;
   455	
 > 456		eb = clk_get_optional(sdev->dev, 0);
   457		if (!eb)
   458			return 0;
   459	
   460		if (IS_ERR(eb))
   461			return PTR_ERR(eb);
   462	
   463		sdev->eb = eb;
   464		return clk_prepare_enable(eb);
   465	}
   466	

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

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Chunyan Zhang <chunyan.zhang@unisoc.com>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Joerg Roedel <jroedel@suse.de>
Subject: [linux-next:master 4765/6512] drivers/iommu/sprd-iommu.c:456:42: sparse: sparse: Using plain integer as NULL pointer
Date: Tue, 23 Mar 2021 18:06:27 +0800	[thread overview]
Message-ID: <202103231825.jVCEFLAf-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   d949689e7383cd5271470f2b99dbe2fd3199bffd
commit: b23e4fc4e3faed0b8b604079c44a244da3ec941a [4765/6512] iommu: add Unisoc IOMMU basic driver
config: m68k-randconfig-s032-20210323 (attached as .config)
compiler: m68k-linux-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.3-277-gc089cd2d-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b23e4fc4e3faed0b8b604079c44a244da3ec941a
        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 b23e4fc4e3faed0b8b604079c44a244da3ec941a
        # 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=m68k 

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/iommu/sprd-iommu.c:456:42: sparse: sparse: Using plain integer as NULL pointer
   drivers/iommu/sprd-iommu.c: note: in included file (through arch/m68k/include/asm/io.h, include/linux/scatterlist.h, include/linux/dma-mapping.h):
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:9: sparse:     expected unsigned int volatile [usertype]
   include/asm-generic/io.h:299:9: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32

vim +456 drivers/iommu/sprd-iommu.c

   446	
   447	/*
   448	 * Clock is not required, access to some of IOMMUs is controlled by gate
   449	 * clk, enabled clocks for that kind of IOMMUs before accessing.
   450	 * Return 0 for success or no clocks found.
   451	 */
   452	static int sprd_iommu_clk_enable(struct sprd_iommu_device *sdev)
   453	{
   454		struct clk *eb;
   455	
 > 456		eb = clk_get_optional(sdev->dev, 0);
   457		if (!eb)
   458			return 0;
   459	
   460		if (IS_ERR(eb))
   461			return PTR_ERR(eb);
   462	
   463		sdev->eb = eb;
   464		return clk_prepare_enable(eb);
   465	}
   466	

---
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: 32698 bytes --]

             reply	other threads:[~2021-03-23 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 10:06 kernel test robot [this message]
2021-03-23 10:06 ` [linux-next:master 4765/6512] drivers/iommu/sprd-iommu.c:456:42: sparse: sparse: Using plain integer as NULL pointer 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=202103231825.jVCEFLAf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.