From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754810AbcBHDrp (ORCPT ); Sun, 7 Feb 2016 22:47:45 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:56898 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752853AbcBHDro (ORCPT ); Sun, 7 Feb 2016 22:47:44 -0500 Date: Sun, 7 Feb 2016 19:47:43 -0800 From: Greg Kroah-Hartman To: Larry Finger Cc: Pinkesh Badjatiya , Luis de Bethencourt , Aya Mahfouz , Shivani Bhardwaj , Punit Vara , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rtl8712: Fix Comparison with constant warning. Message-ID: <20160208034743.GA22850@kroah.com> References: <20160206144111.GA86930@ubuntu> <56B60905.4090206@lwfinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56B60905.4090206@lwfinger.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 06, 2016 at 08:53:57AM -0600, Larry Finger wrote: > On 02/06/2016 08:41 AM, Pinkesh Badjatiya wrote: > >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(-) > > This is another case where the writers of checkpatch are forcing their ideas > of style on the whole world. The problem is that if I reject your patch, it > will be submitted by someone else. Thus, reluctantly > > Acked-by: Larry Finger Well, the general kernel coding style is to put constants on the right hand of the expression, so it is good to have it this way... thanks, greg k-h