public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: YU Bo <tsu.yubo@gmail.com>
Cc: Patard <arnaud.patard@rtp-net.org>,
	Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sim <nicholassimws@gmail.com>, Goyal <bhumirks@gmail.com>,
	Barnes <clifton.a.barnes@gmail.com>,
	Sachdeva <aquannie@gmail.com>, Frederick <fabf@skynet.be>,
	Ravichandran <janani.rvchndrn@gmail.com>,
	yuzibode@126.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging:xgifb: Fix Comparisons should place the constant on the right side of the test warning
Date: Wed, 27 Apr 2016 16:58:36 +0300	[thread overview]
Message-ID: <20160427135836.GM4298@mwanda> (raw)
In-Reply-To: <20160427132736.GA19002@yubo-2>

On Wed, Apr 27, 2016 at 09:27:39AM -0400, YU Bo wrote:
> Fixed checkpatch.pl's warning 'Comparisons should place the constant on
> the right side of the test'
> 
> Signed-off-by: YU Bo <tsu.yubo@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 50c8ea4f5ab7..8bf253c224ad 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) {

I don't understand why checkpatch is complaining about this one...  It
seems like a false positive.  Maybe it's because .PANELID is a rubbish
variable name.

regards,
dan carpetner

  reply	other threads:[~2016-04-27 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27 13:27 [PATCH] staging:xgifb: Fix Comparisons should place the constant on the right side of the test warning YU Bo
2016-04-27 13:58 ` Dan Carpenter [this message]
2016-04-27 14:13   ` YU Bo
2016-04-27 14:31   ` YU Bo

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=20160427135836.GM4298@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=aquannie@gmail.com \
    --cc=arnaud.patard@rtp-net.org \
    --cc=bhumirks@gmail.com \
    --cc=clifton.a.barnes@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=fabf@skynet.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=janani.rvchndrn@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicholassimws@gmail.com \
    --cc=tsu.yubo@gmail.com \
    --cc=yuzibode@126.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