From: kernel test robot <lkp@intel.com>
To: Jiangshan Yi <13667453960@163.com>,
tytso@mit.edu, adilger.kernel@dilger.ca
Cc: kbuild-all@lists.01.org, lczerner@redhat.com,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiangshan Yi <yijiangshan@kylinos.cn>
Subject: Re: [PATCH v3] fs/ext4: replace ternary operator with min()/max() and min_t()
Date: Sun, 21 Aug 2022 06:50:24 +0800 [thread overview]
Message-ID: <202208210652.VUSXxffI-lkp@intel.com> (raw)
In-Reply-To: <20220816011553.2912926-1-13667453960@163.com>
Hi Jiangshan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tytso-ext4/dev]
[also build test WARNING on linus/master v6.0-rc1 next-20220819]
[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/Jiangshan-Yi/fs-ext4-replace-ternary-operator-with-min-max-and-min_t/20220816-144454
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: parisc-randconfig-s041-20220821 (https://download.01.org/0day-ci/archive/20220821/202208210652.VUSXxffI-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/cdc8d157495f1a1cbf921569e2babf14446058cf
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jiangshan-Yi/fs-ext4-replace-ternary-operator-with-min-max-and-min_t/20220816-144454
git checkout cdc8d157495f1a1cbf921569e2babf14446058cf
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=parisc SHELL=/bin/bash fs/ext4/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/ext4/super.c:6907:26: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> fs/ext4/super.c:6907:26: sparse: unsigned long *
>> fs/ext4/super.c:6907:26: sparse: unsigned int *
fs/ext4/super.c:992:6: sparse: sparse: context imbalance in '__ext4_grp_locked_error' - different lock contexts for basic block
fs/ext4/super.c:3266:9: sparse: sparse: context imbalance in 'ext4_check_descriptors' - different lock contexts for basic block
vim +6907 fs/ext4/super.c
6885
6886 /* Read data from quotafile - avoid pagecache and such because we cannot afford
6887 * acquiring the locks... As quota files are never truncated and quota code
6888 * itself serializes the operations (and no one else should touch the files)
6889 * we don't have to be afraid of races */
6890 static ssize_t ext4_quota_read(struct super_block *sb, int type, char *data,
6891 size_t len, loff_t off)
6892 {
6893 struct inode *inode = sb_dqopt(sb)->files[type];
6894 ext4_lblk_t blk = off >> EXT4_BLOCK_SIZE_BITS(sb);
6895 int offset = off & (sb->s_blocksize - 1);
6896 int tocopy;
6897 size_t toread;
6898 struct buffer_head *bh;
6899 loff_t i_size = i_size_read(inode);
6900
6901 if (off > i_size)
6902 return 0;
6903 if (off+len > i_size)
6904 len = i_size-off;
6905 toread = len;
6906 while (toread > 0) {
> 6907 tocopy = min(sb->s_blocksize - offset, toread);
6908 bh = ext4_bread(NULL, inode, blk, 0);
6909 if (IS_ERR(bh))
6910 return PTR_ERR(bh);
6911 if (!bh) /* A hole? */
6912 memset(data, 0, tocopy);
6913 else
6914 memcpy(data, bh->b_data+offset, tocopy);
6915 brelse(bh);
6916 offset = 0;
6917 toread -= tocopy;
6918 data += tocopy;
6919 blk++;
6920 }
6921 return len;
6922 }
6923
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-08-20 22:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 1:15 [PATCH v3] fs/ext4: replace ternary operator with min()/max() and min_t() Jiangshan Yi
2022-08-16 10:10 ` kernel test robot
2022-08-20 22:50 ` kernel test robot [this message]
2022-09-08 2:34 ` Yi Jiangshan
2022-09-08 2:34 ` Yi Jiangshan
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=202208210652.VUSXxffI-lkp@intel.com \
--to=lkp@intel.com \
--cc=13667453960@163.com \
--cc=adilger.kernel@dilger.ca \
--cc=kbuild-all@lists.01.org \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yijiangshan@kylinos.cn \
/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.