linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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?
@ 2021-11-25  6:55 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-11-25  6:55 UTC (permalink / raw)
  To: kbuild, Tudor Ambarus; +Cc: lkp, kbuild-all, linux-kernel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-25  6:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25  6:55 [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? Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).