[PATCH v4 4/4] mtd: spi-nor: implement OTP erase for Winbond and similar flashes

kernel test robot lkp at intel.com
Sun Mar 7 08:48:12 GMT 2021


Hi Michael,

I love your patch! Yet something to improve:

[auto build test ERROR on mtd/spi-nor/next]
[also build test ERROR on linux/master linus/master v5.12-rc2 next-20210305]
[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-OTP-support/20210307-110709
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-nor/next
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-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/61574179875574d957f00e40fa3e9fe9671c0f6e
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Michael-Walle/mtd-spi-nor-OTP-support/20210307-110709
        git checkout 61574179875574d957f00e40fa3e9fe9671c0f6e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc 

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

All errors (new ones prefixed by >>):

   drivers/mtd/spi-nor/otp.c: In function 'spi_nor_otp_init':
>> drivers/mtd/spi-nor/otp.c:451:7: error: 'struct mtd_info' has no member named '_erase_user_prot_reg'; did you mean '_read_user_prot_reg'?
     451 |  mtd->_erase_user_prot_reg = spi_nor_mtd_otp_erase;
         |       ^~~~~~~~~~~~~~~~~~~~
         |       _read_user_prot_reg


vim +451 drivers/mtd/spi-nor/otp.c

   427	
   428	void spi_nor_otp_init(struct spi_nor *nor)
   429	{
   430		struct mtd_info *mtd = &nor->mtd;
   431	
   432		if (!nor->params->otp.ops)
   433			return;
   434	
   435		if (WARN_ON(!is_power_of_2(spi_nor_otp_region_len(nor))))
   436			return;
   437	
   438		/*
   439		 * We only support user_prot callbacks (yet).
   440		 *
   441		 * Some SPI NOR flashes like Macronix ones can be ordered in two
   442		 * different variants. One with a factory locked OTP area and one where
   443		 * it is left to the user to write to it. The factory locked OTP is
   444		 * usually preprogrammed with an "electrical serial number". We don't
   445		 * support these for now.
   446		 */
   447		mtd->_get_user_prot_info = spi_nor_mtd_otp_info;
   448		mtd->_read_user_prot_reg = spi_nor_mtd_otp_read;
   449		mtd->_write_user_prot_reg = spi_nor_mtd_otp_write;
   450		mtd->_lock_user_prot_reg = spi_nor_mtd_otp_lock;
 > 451		mtd->_erase_user_prot_reg = spi_nor_mtd_otp_erase;

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 68891 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20210307/ea676f4b/attachment-0001.gz>


More information about the linux-mtd mailing list