From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752225AbcBFOlb (ORCPT ); Sat, 6 Feb 2016 09:41:31 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:35087 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbcBFOl3 (ORCPT ); Sat, 6 Feb 2016 09:41:29 -0500 Date: Sat, 6 Feb 2016 20:11:11 +0530 From: Pinkesh Badjatiya To: Larry Finger , Florian Schilhabel , Greg Kroah-Hartman , Luis de Bethencourt , Aya Mahfouz , Shivani Bhardwaj , Pinkesh Badjatiya , Punit Vara Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8712: Fix Comparison with constant warning. Message-ID: <20160206144111.GA86930@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix Comparisons with constant on the left side of the test. Checkpatch.pl warning. -- WARNING: Comparisons should place the constant on the right side of the test 296: FILE: ./rtl8712_cmd.c:296: while ((0 != r8712_read32(pAdapter, IOCMD_CTRL_REG)) && Signed-off-by: Pinkesh Badjatiya --- drivers/staging/rtl8712/rtl8712_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c index 9b91609..ce3f7da 100644 --- a/drivers/staging/rtl8712/rtl8712_cmd.c +++ b/drivers/staging/rtl8712/rtl8712_cmd.c @@ -293,7 +293,7 @@ u8 r8712_fw_cmd(struct _adapter *pAdapter, u32 cmd) r8712_write32(pAdapter, IOCMD_CTRL_REG, cmd); msleep(100); - while ((0 != r8712_read32(pAdapter, IOCMD_CTRL_REG)) && + while ((r8712_read32(pAdapter, IOCMD_CTRL_REG) != 0) && (pollingcnts > 0)) { pollingcnts--; msleep(20); -- 1.9.1