[PATCH 11/11] mtd: new support oops logger based on pstore/blk

kbuild test robot lkp at intel.com
Sat Jan 18 09:07:00 PST 2020


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 at intel.com>

All warnings (new ones prefixed by >>):

   drivers//mtd/mtdpstore.c: In function 'mtdpstore_init':
>> drivers//mtd/mtdpstore.c:514:38: warning: passing argument 2 of 'kstrtoul' makes integer from pointer without a cast [-Wint-conversion]
     cxt->index = kstrtoul(info->device, &endp, 0);
                                         ^
   In file included from drivers//mtd/mtdpstore.c:19:0:
   include/linux/kernel.h:353:32: note: expected 'unsigned int' but argument is of type 'char **'
    static inline int __must_check kstrtoul(const char *s, unsigned int base, unsigned long *res)
                                   ^~~~~~~~

vim +/kstrtoul +514 drivers//mtd/mtdpstore.c

   492	
   493	static int __init mtdpstore_init(void)
   494	{
   495		int ret;
   496		struct mtdpstore_context *cxt = &oops_cxt;
   497		struct blkoops_info *info = &cxt->bo_info;
   498		char *endp;
   499	
   500		ret = blkoops_info(info);
   501		if (unlikely(ret))
   502			return ret;
   503	
   504		if (strlen(info->device) == 0) {
   505			pr_err("mtd device must be supplied\n");
   506			return -EINVAL;
   507		}
   508		if (!info->dmesg_size) {
   509			pr_err("no recorder enabled\n");
   510			return -EINVAL;
   511		}
   512	
   513		/* Setup the MTD device to use */
 > 514		cxt->index = kstrtoul(info->device, &endp, 0);
   515		if (*endp != '\0')
   516			cxt->index = -1;
   517	
   518		register_mtd_user(&mtdpstore_notifier);
   519		return 0;
   520	}
   521	module_init(mtdpstore_init);
   522	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 52855 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20200119/5e7aac82/attachment-0001.gz>


More information about the linux-mtd mailing list