From: Joe Perches <joe@perches.com>
To: Tapan Prakash T <tapanprakasht@gmail.com>,
gregkh@linuxfoundation.org, lambert.quentin@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: staging: rts5208: sd.c: Fix Comparisons should place the constant on the right side of the test warning
Date: Tue, 23 Feb 2016 09:55:39 -0800 [thread overview]
Message-ID: <1456250139.10377.6.camel@perches.com> (raw)
In-Reply-To: <1456249449-6416-1-git-send-email-tapanprakasht@gmail.com>
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)) {
prev parent reply other threads:[~2016-02-23 17:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 17:44 Tapan Prakash T
2016-02-23 17:55 ` Joe Perches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456250139.10377.6.camel@perches.com \
--to=joe@perches.com \
--cc=gregkh@linuxfoundation.org \
--cc=lambert.quentin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tapanprakasht@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®