From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754814AbcBWRzn (ORCPT ); Tue, 23 Feb 2016 12:55:43 -0500 Received: from smtprelay0101.hostedemail.com ([216.40.44.101]:35963 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751103AbcBWRzm (ORCPT ); Tue, 23 Feb 2016 12:55:42 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3872:4321:4384:5007:6261:7904:10004:10226:10400:10471:10848:11026:11232:11473:11658:11914:12043:12296:12517:12519:12740:13069:13255:13311:13357:13894:14659:21080:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: wren32_14695475a0d05 X-Filterd-Recvd-Size: 1846 Message-ID: <1456250139.10377.6.camel@perches.com> Subject: Re: [PATCH] drivers: staging: rts5208: sd.c: Fix Comparisons should place the constant on the right side of the test warning From: Joe Perches To: Tapan Prakash T , gregkh@linuxfoundation.org, lambert.quentin@gmail.com Cc: linux-kernel@vger.kernel.org Date: Tue, 23 Feb 2016 09:55:39 -0800 In-Reply-To: <1456249449-6416-1-git-send-email-tapanprakasht@gmail.com> References: <1456249449-6416-1-git-send-email-tapanprakasht@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-02-23 at 23:14 +0530, Tapan Prakash T wrote: > Fixed checkpatch.pl warning 'Comparisons should place the constant on > the right side of the test' [] > diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c [] > @@ -1438,7 +1438,7 @@ static int sd_switch_function(struct rtsx_chip *chip, u8 bus_width) >   >  #ifdef SUPPORT_SD_LOCK >   if ((sd_card->sd_lock_status & SD_SDR_RST) > - && (DDR50_SUPPORT == func_to_switch) > + && (func_to_switch == DDR50_SUPPORT) >   && (sd_card->func_group1_mask & SDR50_SUPPORT_MASK)) { >   func_to_switch = SDR50_SUPPORT; >   dev_dbg(rtsx_dev(chip), "Using SDR50 instead of DDR50 for SD Lock\n"); It would also be more common to write this with the logical tests at the end of line like:   if ((sd_card->sd_lock_status & SD_SDR_RST) && (func_to_switch == DDR50_SUPPORT) && (sd_card->func_group1_mask & SDR50_SUPPORT_MASK)) {