From: Andrew Morton ERROR: trailing statements should be on next line #1022: FILE: drivers/video/via/hw.c:1004: + while ((i < NUM_TOTAL_MODETABLE) ERROR: trailing statements should be on next line #1041: FILE: drivers/video/via/hw.c:1023: + while ((i < NUM_TOTAL_CEA_MODES) WARNING: suspect code indent for conditional statements #1048: FILE: drivers/video/via/hw.c:1030: + while ((i < NUM_TOTAL_MODETABLE) total: 2 errors, 1 warnings, 3796 lines checked ./patches/viafb-hwc-hwh.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Geert Uytterhoeven Cc: Joseph Chan Cc: Joseph Chan Cc: Krzysztof Helt Signed-off-by: Andrew Morton --- drivers/video/via/hw.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff -puN drivers/video/via/hw.c~viafb-hwc-hwh-checkpatch-fixes drivers/video/via/hw.c --- a/drivers/video/via/hw.c~viafb-hwc-hwh-checkpatch-fixes +++ a/drivers/video/via/hw.c @@ -1001,9 +1001,10 @@ static int search_mode_setting(int ModeI { int i = 0; - while ((i < NUM_TOTAL_MODETABLE) - && (ModeInfoIndex != CLE266Modes[i].ModeIndex)) i++; - if ((i >= NUM_TOTAL_MODETABLE)) + while ((i < NUM_TOTAL_MODETABLE) && + (ModeInfoIndex != CLE266Modes[i].ModeIndex)) + i++; + if (i >= NUM_TOTAL_MODETABLE) i = 0; return i; @@ -1020,17 +1021,18 @@ struct VideoModeTable *viafb_get_cea_mod { struct VideoModeTable *TmpTbl = NULL; int i = 0; - while ((i < NUM_TOTAL_CEA_MODES) - && (Index != CEA_HDMI_Modes[i].ModeIndex)) i++; + while ((i < NUM_TOTAL_CEA_MODES) && + (Index != CEA_HDMI_Modes[i].ModeIndex)) + i++; if ((i < NUM_TOTAL_CEA_MODES)) TmpTbl = &CEA_HDMI_Modes[i]; else { /*Still use general timing if don't find CEA timing */ i = 0; - while ((i < NUM_TOTAL_MODETABLE) - && (Index != CLE266Modes[i].ModeIndex)) + while ((i < NUM_TOTAL_MODETABLE) && + (Index != CLE266Modes[i].ModeIndex)) i++; - if ((i >= NUM_TOTAL_MODETABLE)) + if (i >= NUM_TOTAL_MODETABLE) i = 0; TmpTbl = &CLE266Modes[i]; } _