Re: [PATCH 2/4] mtd: spi-nor: Add support for Octal 8D-8D-8D mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mason,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on spi/for-next]
[also build test WARNING on v5.4-rc7]
[cannot apply to next-20191114]
[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/Mason-Yang/mtd-spi-nor-Add-support-for-Octal-8D-8D-8D-mode/20191115-170233
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 7.4.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.4.0 make.cross ARCH=c6x 

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

All warnings (new ones prefixed by >>):

   drivers//mtd/spi-nor/spi-nor.c: In function 'erase_chip':
>> drivers//mtd/spi-nor/spi-nor.c:1001:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
        op.cmd.ext_opcode = ~SPINOR_OP_CHIP_ERASE;
                            ^
   At top level:
   drivers//mtd/spi-nor/spi-nor.c:621:12: warning: 'write_cr2' defined but not used [-Wunused-function]
    static int write_cr2(struct spi_nor *nor, u32 addr, u8 val)
               ^~~~~~~~~

vim +1001 drivers//mtd/spi-nor/spi-nor.c

   976	
   977	/*
   978	 * Erase the whole flash memory
   979	 *
   980	 * Returns 0 if successful, non-zero otherwise.
   981	 */
   982	static int erase_chip(struct spi_nor *nor)
   983	{
   984		dev_dbg(nor->dev, " %lldKiB\n", (long long)(nor->mtd.size >> 10));
   985	
   986		if (nor->spimem) {
   987			struct spi_mem_op op =
   988				SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_CHIP_ERASE, 1),
   989					   SPI_MEM_OP_NO_ADDR,
   990					   SPI_MEM_OP_NO_DUMMY,
   991					   SPI_MEM_OP_NO_DATA);
   992	
   993			if (spi_nor_protocol_is_8_8_8(nor->write_proto)) {
   994				op.cmd.buswidth = 8;
   995				op.cmd.nbytes = 2;
   996	
   997				if (spi_nor_protocol_is_8D_8D_8D(nor->write_proto))
   998					op.cmd.dtr = true;
   999	
  1000				if (nor->ext_cmd_mode == EXT_CMD_IS_INVERSE)
> 1001					op.cmd.ext_opcode = ~SPINOR_OP_CHIP_ERASE;
  1002				else
  1003					op.cmd.ext_opcode = SPINOR_OP_CHIP_ERASE;
  1004			}
  1005	
  1006			return spi_mem_exec_op(nor->spimem, &op);
  1007		}
  1008	
  1009		return nor->write_reg(nor, SPINOR_OP_CHIP_ERASE, NULL, 0);
  1010	}
  1011	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux