public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yury Norov <yury.norov@gmail.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [norov:bitmap 5/49] drivers/net/ethernet/qlogic/qed/qed_rdma.c:338:11: warning: comparison of distinct pointer types ('typeof (bmap->max_count - bit) *' (aka 'unsigned int *') and 'typeof (512UL) *' (aka 'unsigned long *'))
Date: Sat, 26 Mar 2022 19:14:39 +0800	[thread overview]
Message-ID: <202203261918.97wQ7aCy-lkp@intel.com> (raw)

tree:   https://github.com/norov/linux bitmap
head:   0bce39e45f86107fcce7f816fe51d73e6f78a3df
commit: 5c602c9efc42ae865431c9d685858e0b8d1665d0 [5/49] qed: rework qed_rdma_bmap_free()
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220326/202203261918.97wQ7aCy-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/norov/linux/commit/5c602c9efc42ae865431c9d685858e0b8d1665d0
        git remote add norov https://github.com/norov/linux
        git fetch --no-tags norov bitmap
        git checkout 5c602c9efc42ae865431c9d685858e0b8d1665d0
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/ drivers/net/ethernet/qlogic/qed/

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

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/qlogic/qed/qed_rdma.c:338:11: warning: comparison of distinct pointer types ('typeof (bmap->max_count - bit) *' (aka 'unsigned int *') and 'typeof (512UL) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
                   nbits = min(bmap->max_count - bit, 512UL);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:45:19: note: expanded from macro 'min'
   #define min(x, y)       __careful_cmp(x, y, <)
                           ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
           __builtin_choose_expr(__safe_cmp(x, y), \
                                 ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
                   (__typecheck(x, y) && __no_side_effects(x, y))
                    ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
           (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                      ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   1 warning generated.


vim +338 drivers/net/ethernet/qlogic/qed/qed_rdma.c

   318	
   319	void qed_rdma_bmap_free(struct qed_hwfn *p_hwfn,
   320				struct qed_bmap *bmap, bool check)
   321	{
   322		unsigned int bit, weight, nbits;
   323		unsigned long *b;
   324	
   325		if (!check)
   326			goto end;
   327	
   328		weight = bitmap_weight(bmap->bitmap, bmap->max_count);
   329		if (!weight)
   330			goto end;
   331	
   332		DP_NOTICE(p_hwfn,
   333			  "%s bitmap not free - size=%d, weight=%d, 512 bits per line\n",
   334			  bmap->name, bmap->max_count, weight);
   335	
   336		for (bit = 0; bit < bmap->max_count; bit += 512) {
   337			b =  bmap->bitmap + BITS_TO_LONGS(bit);
 > 338			nbits = min(bmap->max_count - bit, 512UL);
   339	
   340			if (!bitmap_empty(b, nbits))
   341				DP_NOTICE(p_hwfn,
   342					  "line 0x%04x: %*pb\n", bit / 512, nbits, b);
   343		}
   344	
   345	end:
   346		kfree(bmap->bitmap);
   347		bmap->bitmap = NULL;
   348	}
   349	

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

                 reply	other threads:[~2022-03-26 11:15 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=202203261918.97wQ7aCy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=yury.norov@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