Re: [PATCH v4 3/3] spi: airoha: add SPI-NAND Flash controller driver

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

 



Hi Lorenzo,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20240424]
[cannot apply to broonie-spi/for-next robh/for-next linus/master v6.9-rc5 v6.9-rc4 v6.9-rc3 v6.9-rc5]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Bianconi/dt-bindings-spi-airoha-Add-YAML-schema-for-SNFI-controller/20240426-164345
base:   next-20240424
patch link:    https://lore.kernel.org/r/2047e9c8372b51dc263178a12e194b8826f1abe7.1714119615.git.lorenzo%40kernel.org
patch subject: [PATCH v4 3/3] spi: airoha: add SPI-NAND Flash controller driver
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20240428/202404280541.VkXyenQ3-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 5ef5eb66fb428aaf61fb51b709f065c069c11242)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240428/202404280541.VkXyenQ3-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404280541.VkXyenQ3-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from drivers/spi/spi-airoha-snfi.c:12:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2254:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from drivers/spi/spi-airoha-snfi.c:12:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     548 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     561 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
         |                                                   ^
   In file included from drivers/spi/spi-airoha-snfi.c:12:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     574 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
         |                                                   ^
   In file included from drivers/spi/spi-airoha-snfi.c:12:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     585 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     595 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     605 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
>> drivers/spi/spi-airoha-snfi.c:581:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
     581 |         default:
         |         ^
   drivers/spi/spi-airoha-snfi.c:581:2: note: insert 'break;' to avoid fall-through
     581 |         default:
         |         ^
         |         break; 
   8 warnings generated.


vim +581 drivers/spi/spi-airoha-snfi.c

   539	
   540	static bool airoha_snand_is_page_ops(const struct spi_mem_op *op)
   541	{
   542		if (op->addr.nbytes != 2)
   543			return false;
   544	
   545		if (op->addr.buswidth != 1 && op->addr.buswidth != 2 &&
   546		    op->addr.buswidth != 4)
   547			return false;
   548	
   549		switch (op->data.dir) {
   550		case SPI_MEM_DATA_IN:
   551			/* check dummy cycle first */
   552			if (op->dummy.nbytes * BITS_PER_BYTE / op->dummy.buswidth > 0xf)
   553				return false;
   554	
   555			/* quad io / quad out */
   556			if ((op->addr.buswidth == 4 || op->addr.buswidth == 1) &&
   557			    op->data.buswidth == 4)
   558				return true;
   559	
   560			/* dual io / dual out */
   561			if ((op->addr.buswidth == 2 || op->addr.buswidth == 1) &&
   562			    op->data.buswidth == 2)
   563				return true;
   564	
   565			/* standard spi */
   566			if (op->addr.buswidth == 1 && op->data.buswidth == 1)
   567				return true;
   568			break;
   569		case SPI_MEM_DATA_OUT:
   570			/* check dummy cycle first */
   571			if (op->dummy.nbytes)
   572				return false;
   573	
   574			/* program load quad out */
   575			if (op->addr.buswidth == 1 && op->data.buswidth == 4)
   576				return true;
   577	
   578			/* standard spi */
   579			if (op->addr.buswidth == 1 && op->data.buswidth == 1)
   580				return true;
 > 581		default:
   582			break;
   583		}
   584	
   585		return false;
   586	}
   587	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux