public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Janne Grunau <j@jannau.net>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [asahilinux:pr/49 2/11] drivers/iommu/io-pgtable-dart.c:176:24: sparse: sparse: Using plain integer as NULL pointer
Date: Fri, 2 Sep 2022 04:20:45 +0800	[thread overview]
Message-ID: <202209020428.kbFTcWgT-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-09-01 20:21 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=202209020428.kbFTcWgT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=j@jannau.net \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox