[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202001182019.g3m9pK8B%lkp@intel.com>
Date: Sat, 18 Jan 2020 20:42:33 +0800
From: kbuild test robot <lkp@...el.com>
To: WeiXiong Liao <liaoweixiong@...winnertech.com>
Cc: kbuild-all@...ts.01.org, Kees Cook <keescook@...omium.org>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>,
Jonathan Corbet <corbet@....net>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Rob Herring <robh@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
WeiXiong Liao <liaoweixiong@...winnertech.com>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mtd@...ts.infradead.org
Subject: Re: [PATCH 01/11] pstore/blk: new support logger for block devices
Hi WeiXiong,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kees/for-next/pstore]
[also build test WARNING on ia64/next linus/master v5.5-rc6 next-20200117]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/WeiXiong-Liao/pstore-support-crash-log-to-block-and-mtd-device/20200117-152012
base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
fs//pstore/blkzone.c: In function 'blkz_zone_write':
>> fs//pstore/blkzone.c:190:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (wcnt != wlen)
^
fs//pstore/blkzone.c:192:2: note: here
case FLUSH_META:
^~~~
vim +190 fs//pstore/blkzone.c
156
157 static int blkz_zone_write(struct blkz_zone *zone,
158 enum blkz_flush_mode flush_mode, const char *buf,
159 size_t len, unsigned long off)
160 {
161 struct blkz_info *info = blkz_cxt.bzinfo;
162 ssize_t wcnt = 0;
163 ssize_t (*writeop)(const char *buf, size_t bytes, loff_t pos);
164 size_t wlen;
165
166 if (off > zone->buffer_size)
167 return -EINVAL;
168 wlen = min_t(size_t, len, zone->buffer_size - off);
169 if (buf && wlen) {
170 memcpy(zone->buffer->data + off, buf, wlen);
171 atomic_set(&zone->buffer->datalen, wlen + off);
172 }
173
174 /* avoid to damage old records */
175 if (!is_on_panic() && !atomic_read(&blkz_cxt.recovered))
176 goto set_dirty;
177
178 writeop = is_on_panic() ? info->panic_write : info->write;
179 if (!writeop)
180 goto set_dirty;
181
182 switch (flush_mode) {
183 case FLUSH_NONE:
184 if (unlikely(buf && wlen))
185 goto set_dirty;
186 return 0;
187 case FLUSH_PART:
188 wcnt = writeop((const char *)zone->buffer->data + off, wlen,
189 zone->off + sizeof(*zone->buffer) + off);
> 190 if (wcnt != wlen)
191 goto set_dirty;
192 case FLUSH_META:
193 wlen = sizeof(struct blkz_buffer);
194 wcnt = writeop((const char *)zone->buffer, wlen, zone->off);
195 if (wcnt != wlen)
196 goto set_dirty;
197 break;
198 case FLUSH_ALL:
199 wlen = zone->buffer_size + sizeof(*zone->buffer);
200 wcnt = writeop((const char *)zone->buffer, wlen, zone->off);
201 if (wcnt != wlen)
202 goto set_dirty;
203 break;
204 }
205
206 return 0;
207 set_dirty:
208 atomic_set(&zone->dirty, true);
209 return -EBUSY;
210 }
211
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (52800 bytes)
Powered by blists - more mailing lists