public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yishai Hadas <yishaih@nvidia.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [PATCH V5 vfio 04/10] vfio: Add an IOVA bitmap support
Date: Fri, 2 Sep 2022 13:30:22 +0800	[thread overview]
Message-ID: <202209021338.Yf1CDIZe-lkp@intel.com> (raw)
In-Reply-To: <20220901093853.60194-5-yishaih@nvidia.com>

Hi Yishai,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.0-rc3 next-20220901]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Yishai-Hadas/Add-device-DMA-logging-support-for-mlx5-driver/20220901-174304
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c5e4d5e99162ba8025d58a3af7ad103f155d2df7
config: hexagon-buildonly-randconfig-r004-20220901 (https://download.01.org/0day-ci/archive/20220902/202209021338.Yf1CDIZe-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c55b41d5199d2394dd6cdb8f52180d8b81d809d4)
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/intel-lab-lkp/linux/commit/84e183bf41bda194be7b88bfeddddc93202bd550
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Yishai-Hadas/Add-device-DMA-logging-support-for-mlx5-driver/20220901-174304
        git checkout 84e183bf41bda194be7b88bfeddddc93202bd550
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/vfio/

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

All warnings (new ones prefixed by >>):

>> drivers/vfio/iova_bitmap.c:405:24: warning: comparison of distinct pointer types ('typeof (1UL) *' (aka 'unsigned long *') and 'typeof (length >> mapped->pgshift) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
           unsigned long nbits = max(1UL, length >> mapped->pgshift), set = nbits;
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:52:19: note: expanded from macro 'max'
   #define max(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 +405 drivers/vfio/iova_bitmap.c

   389	
   390	/**
   391	 * iova_bitmap_set() - Records an IOVA range in bitmap
   392	 * @bitmap: IOVA bitmap
   393	 * @iova: IOVA to start
   394	 * @length: IOVA range length
   395	 *
   396	 * Set the bits corresponding to the range [iova .. iova+length-1] in
   397	 * the user bitmap.
   398	 *
   399	 * Return: The number of bits set.
   400	 */
   401	unsigned long iova_bitmap_set(struct iova_bitmap *bitmap,
   402				      unsigned long iova, size_t length)
   403	{
   404		struct iova_bitmap_map *mapped = &bitmap->mapped;
 > 405		unsigned long nbits = max(1UL, length >> mapped->pgshift), set = nbits;

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

           reply	other threads:[~2022-09-02  5:31 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20220901093853.60194-5-yishaih@nvidia.com>]

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=202209021338.Yf1CDIZe-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=llvm@lists.linux.dev \
    --cc=yishaih@nvidia.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