lkml.org 
[lkml]   [2016]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging:xgifb: Fix Comparisons should place the constant on the right side of the test warning
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

\
 
 \ /
  Last update: 2016-04-27 16:21    [W:0.042 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site