All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 1232/1691] drivers/mtd/nand/raw/tango_nand.c:348:35: warning: Clarify calculation precedence for '&' and
@ 2020-06-16 12:54 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-06-16 12:54 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   27f70ec4fa0e0f419031f1b8d61b1a788244e313
commit: d8ed345a4c622657638b740415c6f73b26bfd132 [1232/1691] mtd: rawnand: tango: Convert the driver to exec_op()
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

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


cppcheck warnings: (new ones prefixed by >>)

>> drivers/mtd/nand/raw/tango_nand.c:348:35: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
    return status & NAND_STATUS_FAIL ? -EIO : 0;
                                     ^

vim +348 drivers/mtd/nand/raw/tango_nand.c

   319	
   320	static int tango_write_page(struct nand_chip *chip, const u8 *buf,
   321				    int oob_required, int page)
   322	{
   323		struct mtd_info *mtd = nand_to_mtd(chip);
   324		struct tango_nfc *nfc = to_tango_nfc(chip->controller);
   325		const struct nand_sdr_timings *timings;
   326		int err, len = mtd->writesize;
   327		u8 status;
   328	
   329		/* Calling tango_write_oob() would send PAGEPROG twice */
   330		if (oob_required)
   331			return -ENOTSUPP;
   332	
   333		tango_select_target(chip, chip->cur_cs);
   334		writel_relaxed(0xffffffff, nfc->mem_base + METADATA);
   335		err = do_dma(nfc, DMA_TO_DEVICE, NFC_WRITE, buf, len, page);
   336		if (err)
   337			return err;
   338	
   339		timings = nand_get_sdr_timings(&chip->data_interface);
   340		err = tango_waitrdy(chip, PSEC_TO_MSEC(timings->tR_max));
   341		if (err)
   342			return err;
   343	
   344		err = nand_status_op(chip, &status);
   345		if (err)
   346			return err;
   347	
 > 348		return status & NAND_STATUS_FAIL ? -EIO : 0;
   349	}
   350	

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

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

only message in thread, other threads:[~2020-06-16 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16 12:54 [linux-next:master 1232/1691] drivers/mtd/nand/raw/tango_nand.c:348:35: warning: Clarify calculation precedence for '&' and kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.