linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: omap2: fix compare_const_fl.cocci warnings
@ 2016-04-14  6:54 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2016-04-14  6:54 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Boris Brezillon, linux-mtd, Richard Weinberger, David Woodhouse,
	Brian Norris, open list, kbuild

[-- Attachment #1: Type: TEXT/PLAIN, Size: 870 bytes --]

Move constants to the right of binary operators.

Generated by: scripts/coccinelle/misc/compare_const_fl.cocci

CC: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

It's minor point, but I think it would look a bit nicer, since one would 
see the important thing (is_write) first.

 omap2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -208,7 +208,7 @@ static int omap_prefetch_enable(int cs,
 	 */
 	val = ((cs << PREFETCH_CONFIG1_CS_SHIFT) |
 		PREFETCH_FIFOTHRESHOLD(fifo_th) | ENABLE_PREFETCH |
-		(dma_mode << DMA_MPU_MODE_SHIFT) | (0x1 & is_write));
+		(dma_mode << DMA_MPU_MODE_SHIFT) | (is_write & 0x1));
 	writel(val, info->reg.gpmc_prefetch_config1);
 
 	/*  Start the prefetch engine */

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

only message in thread, other threads:[~2016-04-14  6:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14  6:54 [PATCH] mtd: nand: omap2: fix compare_const_fl.cocci warnings Julia Lawall

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).