From: kernel test robot <lkp@intel.com>
To: Jean-Marc Eurin <jmeurin@google.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
Jean-Marc Eurin <jmeurin@google.com>
Subject: Re: [PATCH v2 2/2] mtd: mtdoops: Create a header structure for the saved mtdoops.
Date: Thu, 31 Mar 2022 08:14:53 +0800 [thread overview]
Message-ID: <202203310819.kOiVSg8W-lkp@intel.com> (raw)
In-Reply-To: <20220330182816.1177341-4-jmeurin@google.com>
Hi Jean-Marc,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mtd/mtd/next]
[also build test WARNING on mtd/mtd/fixes linux/master linus/master v5.17 next-20220330]
[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]
url: https://github.com/intel-lab-lkp/linux/commits/Jean-Marc-Eurin/mtd-mtdoops-Structure-the-header-of-the-dumped-oops/20220331-023808
base: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next
config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20220331/202203310819.kOiVSg8W-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d)
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/intel-lab-lkp/linux/commit/0d39801219fd826554caf69402424346799810d5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jean-Marc-Eurin/mtd-mtdoops-Structure-the-header-of-the-dumped-oops/20220331-023808
git checkout 0d39801219fd826554caf69402424346799810d5
# 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=x86_64 SHELL=/bin/bash drivers/mtd/
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 >>):
>> drivers/mtd/mtdoops.c:244:39: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
page * record_size, retlen, sizeof(hdr), ret);
^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
1 warning generated.
vim +244 drivers/mtd/mtdoops.c
225
226 static void find_next_position(struct mtdoops_context *cxt)
227 {
228 struct mtd_info *mtd = cxt->mtd;
229 struct mtdoops_hdr hdr;
230 int ret, page, maxpos = 0;
231 u32 maxcount = 0xffffffff;
232 size_t retlen;
233
234 for (page = 0; page < cxt->oops_pages; page++) {
235 if (mtd_block_isbad(mtd, page * record_size))
236 continue;
237 /* Assume the page is used */
238 mark_page_used(cxt, page);
239 ret = mtd_read(mtd, page * record_size, sizeof(hdr),
240 &retlen, (u_char *)&hdr);
241 if (retlen != sizeof(hdr) ||
242 (ret < 0 && !mtd_is_bitflip(ret))) {
243 printk(KERN_ERR "mtdoops: read failure at %ld (%td of %d read), err %d\n",
> 244 page * record_size, retlen, sizeof(hdr), ret);
245 continue;
246 }
247
248 if (hdr.seq == 0xffffffff && hdr.magic == 0xffffffff)
249 mark_page_unused(cxt, page);
250 if (hdr.seq == 0xffffffff || hdr.magic != MTDOOPS_KERNMSG_MAGIC)
251 continue;
252 if (maxcount == 0xffffffff) {
253 maxcount = hdr.seq;
254 maxpos = page;
255 } else if (hdr.seq < 0x40000000 && maxcount > 0xc0000000) {
256 maxcount = hdr.seq;
257 maxpos = page;
258 } else if (hdr.seq > maxcount && hdr.seq < 0xc0000000) {
259 maxcount = hdr.seq;
260 maxpos = page;
261 } else if (hdr.seq > maxcount && hdr.seq > 0xc0000000
262 && maxcount > 0x80000000) {
263 maxcount = hdr.seq;
264 maxpos = page;
265 }
266 }
267 if (maxcount == 0xffffffff) {
268 cxt->nextpage = cxt->oops_pages - 1;
269 cxt->nextcount = 0;
270 }
271 else {
272 cxt->nextpage = maxpos;
273 cxt->nextcount = maxcount;
274 }
275
276 mtdoops_inc_counter(cxt);
277 }
278
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-03-31 0:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 22:01 [PATCH] Fix the size of the header read buffer Jean-Marc Eurin
2022-01-31 10:00 ` Miquel Raynal
2022-02-04 1:53 ` [PATCH v2] mtdoops: " Jean-Marc Eurin
2022-02-07 15:34 ` Miquel Raynal
2022-03-30 18:28 ` [PATCH] " Jean-Marc Eurin
2022-03-30 18:28 ` [PATCH v2 0/2] mtd: mtdoops: Structure the header of the dumped oops Jean-Marc Eurin
2022-03-30 18:28 ` [PATCH v2 1/2] mtd: mtdoops: Fix the size of the header read buffer Jean-Marc Eurin
2022-03-30 18:28 ` [PATCH v2 2/2] mtd: mtdoops: Create a header structure for the saved mtdoops Jean-Marc Eurin
2022-03-30 22:23 ` kernel test robot
2022-03-31 0:14 ` kernel test robot [this message]
2022-03-30 19:59 ` [PATCH] Fix the size of the header read buffer Jean-Marc Eurin
2022-04-15 0:13 ` [PATCH v3 0/3] mtd: mtdoops: Add timestamp to the dumped oops header Jean-Marc Eurin
2022-04-15 0:13 ` [PATCH v3 1/3] mtd: mtdoops: Fix the size of the header read buffer Jean-Marc Eurin
2022-04-21 7:35 ` Miquel Raynal
2022-04-15 0:13 ` [PATCH v3 2/3] mtd: mtdoops: Create a header structure for the saved mtdoops Jean-Marc Eurin
2022-04-21 7:35 ` Miquel Raynal
2022-04-15 0:13 ` [PATCH v3 3/3] mtd: mtdoops: Add a timestamp to the mtdoops header Jean-Marc Eurin
2022-04-21 7:35 ` Miquel Raynal
2022-04-21 23:42 ` [PATCH v4 0/3] mtd: mtdoops: Add timestamp to the dumped oops header Jean-Marc Eurin
2022-04-21 23:42 ` [PATCH v4 1/3] mtd: mtdoops: Fix the size of the header read buffer Jean-Marc Eurin
2022-04-26 7:34 ` Miquel Raynal
2022-04-21 23:42 ` [PATCH v4 2/3] mtd: mtdoops: Create a header structure for the saved mtdoops Jean-Marc Eurin
2022-04-26 7:34 ` Miquel Raynal
2022-04-25 8:42 ` [PATCH v4 0/3] mtd: mtdoops: Add timestamp to the dumped oops header Miquel Raynal
2022-04-25 16:14 ` Jean-Marc Eurin
2022-04-26 7:28 ` Miquel Raynal
2022-04-25 16:09 ` [PATCH v4 3/3] mtd: mtdoops: Add a timestamp to the mtdoops header Jean-Marc Eurin
2022-04-26 7:34 ` Miquel Raynal
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=202203310819.kOiVSg8W-lkp@intel.com \
--to=lkp@intel.com \
--cc=jmeurin@google.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.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
all inboxes | Powered by JetHome®