Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752893AbcD0N1o (ORCPT ); Wed, 27 Apr 2016 09:27:44 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:34718 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752149AbcD0N1m (ORCPT ); Wed, 27 Apr 2016 09:27:42 -0400 Date: Wed, 27 Apr 2016 09:27:39 -0400 From: YU Bo To: Patard , Kroah-Hartman , Sim , Goyal , Barnes , Sachdeva , Frederick , Ravichandran , yuzibode@126.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging:xgifb: Fix Comparisons should place the constant on the right side of the test warning Message-ID: <20160427132736.GA19002@yubo-2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1004 Lines: 32 Fixed checkpatch.pl's warning 'Comparisons should place the constant on the right side of the test' Signed-off-by: YU Bo --- 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