From: lkp@intel.com (kbuild test robot)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mtd: mtk-nor: fix compare_const_fl.cocci warnings
Date: Sat, 7 Nov 2015 01:19:13 +0800 [thread overview]
Message-ID: <20151106171913.GA16163@lkp-nex06> (raw)
In-Reply-To: <1446824889-16144-3-git-send-email-bayi.cheng@mediatek.com>
drivers/mtd/spi-nor/mtk-quadspi.c:223:6-28: Move constant to right.
drivers/mtd/spi-nor/mtk-quadspi.c:214:6-10: Move constant to right.
Move constants to the right of binary operators.
Semantic patch information:
Depends on personal taste in some cases.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
CC: Bayi Cheng <bayi.cheng@mediatek.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
Please take the patch only if it's a positive warning. Thanks!
mtk-quadspi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/drivers/mtd/spi-nor/mtk-quadspi.c
@@ -211,7 +211,7 @@ static int mt8173_nor_write_buffer_enabl
*/
writel(MTK_NOR_WR_BUF_ENABLE, mt8173_nor->base + MTK_NOR_CFG2_REG);
return readb_poll_timeout(mt8173_nor->base + MTK_NOR_CFG2_REG, reg,
- 0x01 == (reg & 0x01), 100, 10000);
+ (reg & 0x01) == 0x01, 100, 10000);
}
static int mt8173_nor_write_buffer_disable(struct mt8173_nor *mt8173_nor)
@@ -220,7 +220,7 @@ static int mt8173_nor_write_buffer_disab
writel(MTK_NOR_WR_BUF_DISABLE, mt8173_nor->base + MTK_NOR_CFG2_REG);
return readb_poll_timeout(mt8173_nor->base + MTK_NOR_CFG2_REG, reg,
- MTK_NOR_WR_BUF_DISABLE == (reg & 0x1), 100,
+ (reg & 0x1) == MTK_NOR_WR_BUF_DISABLE, 100,
10000);
}
next prev parent reply other threads:[~2015-11-06 17:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 15:48 [PATCH v6 0/3] Mediatek SPI-NOR flash driver Bayi Cheng
2015-11-06 15:48 ` [PATCH v6 1/3] doc: dt: add documentation for Mediatek spi-nor controller Bayi Cheng
2015-11-09 16:39 ` Rob Herring
2015-11-11 20:38 ` Brian Norris
2015-11-13 7:20 ` bayi cheng
2015-11-13 19:13 ` Brian Norris
2015-11-06 15:48 ` [PATCH v6 2/3] mtd: mtk-nor: mtk serial flash controller driver Bayi Cheng
2015-11-06 17:19 ` kbuild test robot [this message]
2015-11-06 17:19 ` kbuild test robot
2015-11-10 3:01 ` Brian Norris
2015-11-11 13:51 ` bayi cheng
2015-11-11 21:41 ` Brian Norris
2015-11-13 7:25 ` bayi cheng
2015-11-06 15:48 ` [PATCH v6 3/3] arm64: dts: mt8173: Add nor flash node Bayi Cheng
2015-11-11 21:39 ` Brian Norris
2015-11-10 2:46 ` [PATCH v6 0/3] Mediatek SPI-NOR flash driver Brian Norris
2015-11-11 14:04 ` bayi cheng
2015-11-11 20:26 ` Brian Norris
2015-11-13 6:45 ` bayi cheng
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=20151106171913.GA16163@lkp-nex06 \
--to=lkp@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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