lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202105292054.81P1s2Tq-lkp@intel.com>
Date:   Sat, 29 May 2021 20:53:03 +0800
From:   kernel test robot <lkp@...el.com>
To:     Heiko Schocher <hs@...x.de>, linux-mtd@...ts.infradead.org
Cc:     kbuild-all@...ts.01.org, Heiko Schocher <hs@...x.de>,
        Fabio Estevam <festevam@...x.de>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] mtd: devices: add support for microchip 48l640
 EERAM

Hi Heiko,

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.13-rc3 next-20210528]
[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/0day-ci/linux/commits/Heiko-Schocher/mtd-devices-add-support-for-microchip-48l640-EERAM/20210529-182943
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
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/0day-ci/linux/commit/eccf3abb95a75cb12c0506c6db8d129b69c71a9c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Heiko-Schocher/mtd-devices-add-support-for-microchip-48l640-EERAM/20210529-182943
        git checkout eccf3abb95a75cb12c0506c6db8d129b69c71a9c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:409,
                    from include/linux/kernel.h:17,
                    from include/linux/delay.h:22,
                    from drivers/mtd/devices/mchp48l640.c:14:
   drivers/mtd/devices/mchp48l640.c: In function 'mchp48l640_read':
>> drivers/mtd/devices/mchp48l640.c:280:28: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     280 |  dev_dbg(&flash->spi->dev, "read len: %ld from: %llx", len, from);
         |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
     129 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
     161 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
     123 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
     123 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                       ^~~~~~~
   drivers/mtd/devices/mchp48l640.c:280:2: note: in expansion of macro 'dev_dbg'
     280 |  dev_dbg(&flash->spi->dev, "read len: %ld from: %llx", len, from);
         |  ^~~~~~~
   drivers/mtd/devices/mchp48l640.c:280:41: note: format string is defined here
     280 |  dev_dbg(&flash->spi->dev, "read len: %ld from: %llx", len, from);
         |                                       ~~^
         |                                         |
         |                                         long int
         |                                       %d


vim +280 drivers/mtd/devices/mchp48l640.c

   265	
   266	static int mchp48l640_read(struct mtd_info *mtd, loff_t from, size_t len,
   267				   size_t *retlen, unsigned char *buf)
   268	{
   269		struct mchp48l640_flash *flash = to_mchp48l640_flash(mtd);
   270		int ret;
   271		size_t wlen = 0;
   272		loff_t woff = from;
   273		size_t ws;
   274		size_t page_sz = flash->caps->page_size;
   275	
   276		/*
   277		 * we set PRO bit (page rollover), but if read length > page size
   278		 * does result in total chaos in result ...
   279		 */
 > 280		dev_dbg(&flash->spi->dev, "read len: %ld from: %llx", len, from);
   281		while (wlen < len) {
   282			ws = min((len - wlen), page_sz);
   283			ret = mchp48l640_read_page(mtd, woff, ws, retlen, &buf[wlen]);
   284			if (ret)
   285				return ret;
   286			wlen += ws;
   287			woff += ws;
   288		}
   289	
   290		return ret;
   291	};
   292	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (68144 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ