* [PATCH] staging:xgifb: Fix Comparisons should place the constant on the right side of the test warning
@ 2016-04-27 13:27 YU Bo
2016-04-27 13:58 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: YU Bo @ 2016-04-27 13:27 UTC (permalink / raw)
To: Patard, Kroah-Hartman, Sim, Goyal, Barnes, Sachdeva, Frederick,
Ravichandran, yuzibode
Cc: devel, linux-kernel
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) {
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++;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging:xgifb: Fix Comparisons should place the constant on the right side of the test warning
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
2016-04-27 14:13 ` YU Bo
2016-04-27 14:31 ` YU Bo
0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-04-27 13:58 UTC (permalink / raw)
To: YU Bo
Cc: Patard, Kroah-Hartman, Sim, Goyal, Barnes, Sachdeva, Frederick,
Ravichandran, yuzibode, devel, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging:xgifb: Fix Comparisons should place the constant on the right side of the test warning
2016-04-27 13:58 ` Dan Carpenter
@ 2016-04-27 14:13 ` YU Bo
2016-04-27 14:31 ` YU Bo
1 sibling, 0 replies; 4+ messages in thread
From: YU Bo @ 2016-04-27 14:13 UTC (permalink / raw)
To: Dan Carpenter
Cc: Patard, Kroah-Hartman, Sim, Goyal, Barnes, Sachdeva, Frederick,
Ravichandran, yuzibode, devel, linux-kernel
On Wed, Apr 27, 2016 at 04:58:36PM +0300, Dan Carpenter wrote:
>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.
Yes.I am also confused when i'm ready to submit the patch.Obviously
'temp[ad]x' is variable.My first patch have to wait a long time.:)
>
>regards,
>dan carpetner
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging:xgifb: Fix Comparisons should place the constant on the right side of the test warning
2016-04-27 13:58 ` Dan Carpenter
2016-04-27 14:13 ` YU Bo
@ 2016-04-27 14:31 ` YU Bo
1 sibling, 0 replies; 4+ messages in thread
From: YU Bo @ 2016-04-27 14:31 UTC (permalink / raw)
To: Dan Carpenter
Cc: Patard, Kroah-Hartman, Sim, Goyal, Barnes, Sachdeva, Frederick,
Ravichandran, yuzibode, devel, linux-kernel
On Wed, Apr 27, 2016 at 04:58:36PM +0300, Dan Carpenter wrote:
>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.
Here, it seems like to notice upper case identifier on the left.
https://lkml.org/lkml/diff/2015/8/27/469/1
Best Regards,
>
>regards,
>dan carpetner
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-27 14:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-04-27 14:13 ` YU Bo
2016-04-27 14:31 ` YU Bo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox