lkml.org 
[lkml]   [2021]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[ambarus:spi-nor/next-clean-v4bis-sent 19/24] drivers/mtd/spi-nor/core.c:2720 spi_nor_init_params_deprecated() warn: should this be a bitwise op?
tree:   https://github.com/ambarus/linux-0day spi-nor/next-clean-v4bis-sent
head: 088cf85cc4ef6d55a30cfab8ec33db3f1b15b777
commit: 40e3789d75cb97ab687d84fe7190dab363a758a0 [19/24] mtd: spi-nor: core: Init all flash parameters based on SFDP where possible
config: nios2-randconfig-m031-20211123 (https://download.01.org/0day-ci/archive/20211125/202111250118.loeFlVbe-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/mtd/spi-nor/core.c:2720 spi_nor_init_params_deprecated() warn: should this be a bitwise op?

vim +2720 drivers/mtd/spi-nor/core.c

40e3789d75cb97 Tudor Ambarus 2021-10-29 2714 static void spi_nor_init_params_deprecated(struct spi_nor *nor)
40e3789d75cb97 Tudor Ambarus 2021-10-29 2715 {
40e3789d75cb97 Tudor Ambarus 2021-10-29 2716 spi_nor_no_sfdp_init_params(nor);
40e3789d75cb97 Tudor Ambarus 2021-10-29 2717
40e3789d75cb97 Tudor Ambarus 2021-10-29 2718 spi_nor_manufacturer_init_params(nor);
40e3789d75cb97 Tudor Ambarus 2021-10-29 2719
40e3789d75cb97 Tudor Ambarus 2021-10-29 @2720 if ((SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_OCTAL_READ |
40e3789d75cb97 Tudor Ambarus 2021-10-29 2721 SPI_NOR_OCTAL_DTR_READ) &&
40e3789d75cb97 Tudor Ambarus 2021-10-29 2722 !(nor->info->no_sfdp_flags & SPI_NOR_SKIP_SFDP))

It's really unclear what's going on with this condition. Is there a
variable missing from the first part?

40e3789d75cb97 Tudor Ambarus 2021-10-29 2723 spi_nor_sfdp_init_params_deprecated(nor);
40e3789d75cb97 Tudor Ambarus 2021-10-29 2724 }

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

\
 
 \ /
  Last update: 2021-11-25 07:59    [W:1.644 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site