cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [gfs2:for-next 11/11] fs/gfs2/file.c:796:10: warning: comparison of distinct pointer types ('typeof (size) *' (aka 'unsigned int *') and 'typeof (nr_dirtied * (1UL << 16)) *' (aka 'unsigned long *'))
Date: Thu, 17 Mar 2022 07:24:26 +0800	[thread overview]
Message-ID: <202203170735.Ndb8Ua7n-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next
head:   a20050c14edf19add5a9588cb196bb00aa410650
commit: a20050c14edf19add5a9588cb196bb00aa410650 [11/11] gfs2: Add read/write page 'fault_stats'
config: hexagon-randconfig-r041-20220313 (https://download.01.org/0day-ci/archive/20220317/202203170735.Ndb8Ua7n-lkp at intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6ec1e3d798f8eab43fb3a91028c6ab04e115fcb)
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://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?id=a20050c14edf19add5a9588cb196bb00aa410650
        git remote add gfs2 https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
        git fetch --no-tags gfs2 for-next
        git checkout a20050c14edf19add5a9588cb196bb00aa410650
        # 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=hexagon SHELL=/bin/bash fs/gfs2/

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 >>):

>> fs/gfs2/file.c:796:10: warning: comparison of distinct pointer types ('typeof (size) *' (aka 'unsigned int *') and 'typeof (nr_dirtied * (1UL << 16)) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
                   size = min(size, nr_dirtied * PAGE_SIZE);
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   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 +796 fs/gfs2/file.c

   772	
   773	static inline bool should_fault_in_pages(ssize_t ret, struct iov_iter *i,
   774						 size_t *prev_count,
   775						 size_t *window_size)
   776	{
   777		size_t count = iov_iter_count(i);
   778		size_t size, offs;
   779	
   780		if (likely(!count))
   781			return false;
   782		if (ret <= 0 && ret != -EFAULT)
   783			return false;
   784		if (!iter_is_iovec(i))
   785			return false;
   786	
   787		size = PAGE_SIZE;
   788		offs = offset_in_page(i->iov[0].iov_base + i->iov_offset);
   789		if (*prev_count != count || !*window_size) {
   790			int nr_dirtied;
   791	
   792			size = ALIGN(offs + count, PAGE_SIZE);
   793			size = min_t(size_t, size, SZ_1M);
   794			nr_dirtied = max(current->nr_dirtied_pause -
   795					 current->nr_dirtied, 8);
 > 796			size = min(size, nr_dirtied * PAGE_SIZE);
   797		}
   798	
   799		*prev_count = count;
   800		*window_size = size - offs;
   801		return true;
   802	}
   803	

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all at lists.01.org


                 reply	other threads:[~2022-03-16 23:24 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=202203170735.Ndb8Ua7n-lkp@intel.com \
    --to=lkp@intel.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;
as well as URLs for NNTP newsgroup(s).