public inbox for [email protected]
 help / color / mirror / Atom feed
* [ammarfaizi2-block:dhowells/linux-fs/iov-extract-3 17/17] mm/shmem.c:2731:9: warning: comparison of distinct pointer types ('typeof (size) *' (aka 'unsigned int *') and 'typeof (((1UL) << 14) - offset) *' (aka 'unsigned long *'))
@ 2023-02-14 12:56 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-14 12:56 UTC (permalink / raw)
  To: David Howells; +Cc: llvm, oe-kbuild-all, Ammar Faizi, GNU/Weeb Mailing List

tree:   https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/iov-extract-3
head:   17cd42e56c9be2df7fc5ec06c2315cab669a43b0
commit: 17cd42e56c9be2df7fc5ec06c2315cab669a43b0 [17/17] shmem, overlayfs, coda, tty, proc, kernfs, random: Fix splice-read
config: mips-randconfig-r003-20230212 (https://download.01.org/0day-ci/archive/20230214/[email protected]/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project db89896bbbd2251fff457699635acbbedeead27f)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mipsel-linux-gnu
        # https://github.com/ammarfaizi2/linux-block/commit/17cd42e56c9be2df7fc5ec06c2315cab669a43b0
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/iov-extract-3
        git checkout 17cd42e56c9be2df7fc5ec06c2315cab669a43b0
        # 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=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> mm/shmem.c:2731:9: warning: comparison of distinct pointer types ('typeof (size) *' (aka 'unsigned int *') and 'typeof (((1UL) << 14) - offset) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
           size = min(size, PAGE_SIZE - offset);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:67: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 +2731 mm/shmem.c

  2725	
  2726	static size_t splice_zeropage_into_pipe(struct pipe_inode_info *pipe,
  2727						loff_t fpos, size_t size)
  2728	{
  2729		size_t offset = fpos & ~PAGE_MASK;
  2730	
> 2731		size = min(size, PAGE_SIZE - offset);
  2732	
  2733		if (!pipe_full(pipe->head, pipe->tail, pipe->max_usage)) {
  2734			struct pipe_buffer *buf = pipe_head_buf(pipe);
  2735	
  2736			*buf = (struct pipe_buffer) {
  2737				.ops	= &zero_pipe_buf_ops,
  2738				.page	= ZERO_PAGE(0),
  2739				.offset	= offset,
  2740				.len	= size,
  2741			};
  2742			get_page(buf->page);
  2743			pipe->head++;
  2744		}
  2745	
  2746		return size;
  2747	}
  2748	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

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

only message in thread, other threads:[~2023-02-14 12:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-14 12:56 [ammarfaizi2-block:dhowells/linux-fs/iov-extract-3 17/17] mm/shmem.c:2731:9: warning: comparison of distinct pointer types ('typeof (size) *' (aka 'unsigned int *') and 'typeof (((1UL) << 14) - offset) *' (aka 'unsigned long *')) 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