linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
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?
Date: Thu, 25 Nov 2021 09:55:31 +0300	[thread overview]
Message-ID: <202111250118.loeFlVbe-lkp@intel.com> (raw)

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


                 reply	other threads:[~2021-11-25  6:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202111250118.loeFlVbe-lkp@intel.com \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=tudor.ambarus@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).