From patchwork Fri Nov 6 17:19:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 7570181 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1BC0BC05C6 for ; Fri, 6 Nov 2015 17:22:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D92F20732 for ; Fri, 6 Nov 2015 17:22:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7EDEF20729 for ; Fri, 6 Nov 2015 17:22:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZukgW-0006N4-A7; Fri, 06 Nov 2015 17:20:20 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZukgQ-0005C5-Sj; Fri, 06 Nov 2015 17:20:16 +0000 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 06 Nov 2015 09:19:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,252,1444719600"; d="scan'208";a="595371626" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by FMSMGA003.fm.intel.com with ESMTP; 06 Nov 2015 09:19:49 -0800 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1Zukfo-000GSf-3P; Sat, 07 Nov 2015 01:19:36 +0800 Date: Sat, 7 Nov 2015 01:19:13 +0800 From: kbuild test robot To: Bayi Cheng Subject: [PATCH] mtd: mtk-nor: fix compare_const_fl.cocci warnings Message-ID: <20151106171913.GA16163@lkp-nex06> References: <201511070104.OaJ5fn5L%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1446824889-16144-3-git-send-email-bayi.cheng@mediatek.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151106_092014_975315_01F53850 X-CRM114-Status: GOOD ( 10.40 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Bayi Cheng , srv_heupstream@mediatek.com, Pawel Moll , Ian Campbell , Sascha Hauer , linux-kernel@vger.kernel.org, Daniel Kurtz , jteki@openedev.com, Rob Herring , linux-mediatek@lists.infradead.org, kbuild-all@01.org, Kumar Gala , Matthias Brugger , linux-mtd@lists.infradead.org, Brian Norris , David Woodhouse , linux-arm-kernel@lists.infradead.org, ezequiel@vanguardiasur.com.ar Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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); }