All of lore.kernel.org
 help / color / mirror / Atom feed
* [shenki:dev-5.7 9/114] drivers/mtd/spi-nor/controllers/aspeed-smc.c:890:47: warning: Clarify calculation precedence for '&' and
@ 2020-07-03  3:42 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-03  3:42 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/shenki/linux dev-5.7
head:   b18dec9684189c3816e4b48cf811fe450caedce9
commit: 38ca6337c5b549e9d713fe188b6f6c849551da6e [9/114] mtd: spi-nor: aspeed: add support for the 4B opcodes
compiler: gcc-9 (Debian 9.3.0-14) 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/spi-nor/controllers/aspeed-smc.c:890:47: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
    u8 cmd = chip->nor.flags & SNOR_F_4B_OPCODES ? SPINOR_OP_READ_4B :
                                                 ^

vim +890 drivers/mtd/spi-nor/controllers/aspeed-smc.c

   880	
   881	static u32 aspeed_smc_default_read(struct aspeed_smc_chip *chip)
   882	{
   883		/*
   884		 * Keep the 4Byte address mode on the AST2400 SPI controller.
   885		 * Other controllers set the 4Byte mode in the CE Control
   886		 * Register
   887		 */
   888		u32 ctl_mask = chip->controller->info == &spi_2400_info ?
   889			 CONTROL_IO_ADDRESS_4B : 0;
 > 890		u8 cmd = chip->nor.flags & SNOR_F_4B_OPCODES ? SPINOR_OP_READ_4B :
   891			SPINOR_OP_READ;
   892	
   893		/*
   894		 * Use the "read command" mode to customize the opcode. In
   895		 * normal command mode, the value is necessarily READ (0x3) on
   896		 * the AST2400/2500 SoCs.
   897		 */
   898		return (chip->ctl_val[smc_read] & ctl_mask) |
   899			(0x00 << 28) | /* Single bit */
   900			(0x00 << 24) | /* CE# max */
   901			(cmd  << 16) | /* use read mode to support 4B opcode */
   902			(0x00 <<  8) | /* HCLK/16 */
   903			(0x00 <<  6) | /* no dummy cycle */
   904			(0x01);        /* read mode */
   905	}
   906	

---
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:[~2020-07-03  3:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03  3:42 [shenki:dev-5.7 9/114] drivers/mtd/spi-nor/controllers/aspeed-smc.c:890:47: 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.