From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] mtd: mtk-nor: fix compare_const_fl.cocci warnings Date: Sat, 7 Nov 2015 01:19:13 +0800 Message-ID: <20151106171913.GA16163@lkp-nex06> References: <201511070104.OaJ5fn5L%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1446824889-16144-3-git-send-email-bayi.cheng@mediatek.com> Sender: linux-kernel-owner@vger.kernel.org Cc: kbuild-all@01.org, David Woodhouse , Brian Norris , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Matthias Brugger , Daniel Kurtz , Sascha Hauer , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, srv_heupstream@mediatek.com, jteki@openedev.com, ezequiel@vanguardiasur.com.ar, Bayi Cheng List-Id: devicetree@vger.kernel.org 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 Signed-off-by: Fengguang Wu --- 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); }