Re: [PATCH v1 12/14] mtd: spi-nor: move all spansion specifics into spansion.c

From: kernel test robot
Date: Wed Feb 02 2022 - 15:07:41 EST


Hi Michael,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mtd/spi-nor/next]
[also build test WARNING on linux/master linus/master v5.17-rc2 next-20220202]
[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/Michael-Walle/mtd-spi-nor-move-vendor-specific-code-into-vendor-modules/20220202-230139
base: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-nor/next
config: x86_64-randconfig-a001 (https://download.01.org/0day-ci/archive/20220203/202202030449.IQfj2Y5O-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6b1e844b69f15bb7dffaf9365cd2b355d2eb7579)
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/01f9808a20c96553c43f929e10f3fb448cd8bd93
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Michael-Walle/mtd-spi-nor-move-vendor-specific-code-into-vendor-modules/20220202-230139
git checkout 01f9808a20c96553c43f929e10f3fb448cd8bd93
# 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/spi-nor/

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

All warnings (new ones prefixed by >>):

>> drivers/mtd/spi-nor/spansion.c:332:5: warning: no previous prototype for function 'spi_nor_sr_ready_and_clear' [-Wmissing-prototypes]
int spi_nor_sr_ready_and_clear(struct spi_nor *nor)
^
drivers/mtd/spi-nor/spansion.c:332:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int spi_nor_sr_ready_and_clear(struct spi_nor *nor)
^
static
1 warning generated.


vim +/spi_nor_sr_ready_and_clear +332 drivers/mtd/spi-nor/spansion.c

324
325 /**
326 * spi_nor_sr_ready_and_clear() - Query the Status Register to see if the flash
327 * is ready for new commands and clear it.
328 * @nor: pointer to 'struct spi_nor'.
329 *
330 * Return: 1 if ready, 0 if not ready, -errno on errors.
331 */
> 332 int spi_nor_sr_ready_and_clear(struct spi_nor *nor)
333 {
334 int ret;
335
336 ret = spi_nor_read_sr(nor, nor->bouncebuf);
337 if (ret)
338 return ret;
339
340 if (nor->bouncebuf[0] & (SR_E_ERR | SR_P_ERR)) {
341 if (nor->bouncebuf[0] & SR_E_ERR)
342 dev_err(nor->dev, "Erase Error occurred\n");
343 else
344 dev_err(nor->dev, "Programming Error occurred\n");
345
346 spi_nor_clear_sr(nor);
347
348 /*
349 * WEL bit remains set to one when an erase or page program
350 * error occurs. Issue a Write Disable command to protect
351 * against inadvertent writes that can possibly corrupt the
352 * contents of the memory.
353 */
354 ret = spi_nor_write_disable(nor);
355 if (ret)
356 return ret;
357
358 return -EIO;
359 }
360
361 return !(nor->bouncebuf[0] & SR_WIP);
362 }
363

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