public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [asahilinux:pr/49 2/11] drivers/iommu/io-pgtable-dart.c:176:24: sparse: sparse: Using plain integer as NULL pointer
@ 2022-09-01 20:20 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-09-01 20:20 UTC (permalink / raw)
  To: Janne Grunau; +Cc: kbuild-all, linux-kernel

tree:   https://github.com/AsahiLinux/linux pr/49
head:   db5fe20b7f88a8443b0a3dd88bcfb35f1639624f
commit: d37982729eab5e80525ade0e5859409c284a8283 [2/11] iommu/io-pgtable: Move Apple DART support to its own file
config: alpha-randconfig-s042-20220901 (https://download.01.org/0day-ci/archive/20220902/202209020428.kbFTcWgT-lkp@intel.com/config)
compiler: alpha-linux-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://github.com/AsahiLinux/linux/commit/d37982729eab5e80525ade0e5859409c284a8283
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux pr/49
        git checkout d37982729eab5e80525ade0e5859409c284a8283
        # 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=alpha SHELL=/bin/bash drivers/iommu/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

sparse warnings: (new ones prefixed by >>)
>> drivers/iommu/io-pgtable-dart.c:176:24: sparse: sparse: Using plain integer as NULL pointer

vim +176 drivers/iommu/io-pgtable-dart.c

   161	
   162	static  dart_iopte *dart_get_l2(struct dart_io_pgtable *data, unsigned long iova)
   163	{
   164		dart_iopte pte, *ptep;
   165		int tbl = dart_get_table(data, iova);
   166	
   167		ptep = data->pgd[tbl];
   168		if (!ptep)
   169			return NULL;
   170	
   171		ptep += dart_get_l1_index(data, iova);
   172		pte = READ_ONCE(*ptep);
   173	
   174		/* Valid entry? */
   175		if (!pte)
 > 176			return 0;
   177	
   178		/* Deref to get level 2 table */
   179		return iopte_deref(pte, data);
   180	}
   181	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-01 20:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-01 20:20 [asahilinux:pr/49 2/11] drivers/iommu/io-pgtable-dart.c:176:24: sparse: sparse: Using plain integer as NULL pointer kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox