public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Clifton Barnes <clifton.a.barnes@gmail.com>, arnaud.patard@rtp-net.org
Cc: kernel-janitors@vger.kernel.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] staging: xgifb: fix comparison order
Date: Sun, 27 Mar 2016 12:22:04 -0700	[thread overview]
Message-ID: <1459106524.25110.12.camel@perches.com> (raw)
In-Reply-To: <1459105983-17251-4-git-send-email-clifton.a.barnes@gmail.com>

On Sun, 2016-03-27 at 15:13 -0400, Clifton Barnes wrote:
> fix checkpatch.pl warning about 'Comparisons should place the constant
> on the right side of the test'

checkpatch false positives.

> Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
> ---
>  drivers/staging/xgifb/vb_setmode.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
> index 50c8ea4..8bf253c 100644
> --- a/drivers/staging/xgifb/vb_setmode.c
> +++ b/drivers/staging/xgifb/vb_setmode.c
> @@ -1208,7 +1208,7 @@ static void const *XGI_GetLcdPtr(struct XGI330_LCDDataTablStruct const *table,
>  		if (pVBInfo->LCDInfo & EnableScalingLCD)
>  			tempdx &= (~PanelResInfo);
>  
> -		if (table[i].PANELID == tempdx) {
> +		if (tempdx == table[i].PANELID) {
>  			tempbx = table[i].MASK;
>  			tempdx = pVBInfo->LCDInfo;
>  
> @@ -3902,7 +3902,7 @@ static struct XGI301C_Tap4TimingStruct const
>  
>  	i = 0;
>  	while (Tap4TimingPtr[i].DE != 0xFFFF) {
> -		if (Tap4TimingPtr[i].DE == tempax)
> +		if (tempax == Tap4TimingPtr[i].DE)
>  			break;
>  		i++;
>  	}

  reply	other threads:[~2016-03-27 19:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-27 19:12 [PATCH 1/5] staging: xgifb: fix block comments Clifton Barnes
2016-03-27 19:13 ` [PATCH 2/5] staging: xgifb: fix 'line over 80 characters' Clifton Barnes
2016-03-27 19:13 ` [PATCH 3/5] staging: xgifb: fix code indent Clifton Barnes
2016-03-27 19:13 ` [PATCH 4/5] staging: xgifb: fix comparison order Clifton Barnes
2016-03-27 19:22   ` Joe Perches [this message]
2016-03-27 19:13 ` [PATCH 5/5] staging: xgifb: fix bare use of 'unsigned' Clifton Barnes
2016-03-29 19:35 ` [PATCH 1/5] staging: xgifb: fix block comments Greg KH

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=1459106524.25110.12.camel@perches.com \
    --to=joe@perches.com \
    --cc=arnaud.patard@rtp-net.org \
    --cc=clifton.a.barnes@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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