From: kernel test robot <lkp@intel.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [bvanassche:f2fs 4/4] fs/f2fs/segment.h:417:21: warning: comparison of distinct pointer types ('typeof (start + (4096 / sizeof(struct f2fs_sit_entry))) *' (aka 'unsigned int *') and 'typeof ((unsigned long)(SM_I(sbi)->main_segments)) *' (aka 'unsigned long *'))
Date: Mon, 18 Jul 2022 14:31:03 +0800 [thread overview]
Message-ID: <202207181452.urqB2dj0-lkp@intel.com> (raw)
tree: https://github.com/bvanassche/linux f2fs
head: 787811ac4178b6f0a77923aa25c58b4041a52f05
commit: 787811ac4178b6f0a77923aa25c58b4041a52f05 [4/4] f
config: i386-randconfig-a002 (https://download.01.org/0day-ci/archive/20220718/202207181452.urqB2dj0-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d74b88c69dc2644bd0dc5d64e2d7413a0d4040e5)
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/bvanassche/linux/commit/787811ac4178b6f0a77923aa25c58b4041a52f05
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche f2fs
git checkout 787811ac4178b6f0a77923aa25c58b4041a52f05
# 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=i386 SHELL=/bin/bash fs/
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 >>):
In file included from fs/f2fs/file.c:31:
>> fs/f2fs/segment.h:417:21: warning: comparison of distinct pointer types ('typeof (start + (4096 / sizeof(struct f2fs_sit_entry))) *' (aka 'unsigned int *') and 'typeof ((unsigned long)(SM_I(sbi)->main_segments)) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
unsigned int end = min(start + SIT_ENTRY_PER_BLOCK,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
--
In file included from fs/f2fs/segment.c:22:
>> fs/f2fs/segment.h:417:21: warning: comparison of distinct pointer types ('typeof (start + (4096 / sizeof(struct f2fs_sit_entry))) *' (aka 'unsigned int *') and 'typeof ((unsigned long)(SM_I(sbi)->main_segments)) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
unsigned int end = min(start + SIT_ENTRY_PER_BLOCK,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
>> fs/f2fs/segment.c:4070:22: warning: comparison of distinct pointer types ('typeof (start_segno + (4096 / sizeof(struct f2fs_sit_entry))) *' (aka 'unsigned int *') and 'typeof ((unsigned long)(SM_I(sbi)->main_segments)) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
unsigned int end = min(start_segno + SIT_ENTRY_PER_BLOCK,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
2 warnings generated.
vim +417 fs/f2fs/segment.h
068c3cd8586678 Yunlei He 2018-01-25 410
068c3cd8586678 Yunlei He 2018-01-25 411 static inline void seg_info_to_sit_page(struct f2fs_sb_info *sbi,
068c3cd8586678 Yunlei He 2018-01-25 412 struct page *page, unsigned int start)
068c3cd8586678 Yunlei He 2018-01-25 413 {
068c3cd8586678 Yunlei He 2018-01-25 414 struct f2fs_sit_block *raw_sit;
068c3cd8586678 Yunlei He 2018-01-25 415 struct seg_entry *se;
068c3cd8586678 Yunlei He 2018-01-25 416 struct f2fs_sit_entry *rs;
068c3cd8586678 Yunlei He 2018-01-25 @417 unsigned int end = min(start + SIT_ENTRY_PER_BLOCK,
068c3cd8586678 Yunlei He 2018-01-25 418 (unsigned long)MAIN_SEGS(sbi));
068c3cd8586678 Yunlei He 2018-01-25 419 int i;
068c3cd8586678 Yunlei He 2018-01-25 420
068c3cd8586678 Yunlei He 2018-01-25 421 raw_sit = (struct f2fs_sit_block *)page_address(page);
81114baa835b59 Chao Yu 2018-04-09 422 memset(raw_sit, 0, PAGE_SIZE);
068c3cd8586678 Yunlei He 2018-01-25 423 for (i = 0; i < end - start; i++) {
068c3cd8586678 Yunlei He 2018-01-25 424 rs = &raw_sit->entries[i];
068c3cd8586678 Yunlei He 2018-01-25 425 se = get_seg_entry(sbi, start + i);
068c3cd8586678 Yunlei He 2018-01-25 426 __seg_info_to_raw_sit(se, rs);
068c3cd8586678 Yunlei He 2018-01-25 427 }
068c3cd8586678 Yunlei He 2018-01-25 428 }
068c3cd8586678 Yunlei He 2018-01-25 429
:::::: The code at line 417 was first introduced by commit
:::::: 068c3cd85866785303f18960a4c00a182515b963 f2fs: rebuild sit page from sit info in mem
:::::: TO: Yunlei He <heyunlei@huawei.com>
:::::: CC: Jaegeuk Kim <jaegeuk@kernel.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-07-18 6:31 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=202207181452.urqB2dj0-lkp@intel.com \
--to=lkp@intel.com \
--cc=bvanassche@acm.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.