Skip to content

Commit 864eb1a

Browse files
nathanchancebzolnier
authored andcommitted
video: fbdev: sis: Remove unnecessary parentheses and commented code
Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/video/fbdev/sis/init301.c:851:42: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* || ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ drivers/video/fbdev/sis/init301.c:851:42: note: remove extraneous parentheses around the comparison to silence this warning } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* || ~ ^ ~ drivers/video/fbdev/sis/init301.c:851:42: note: use '=' to turn this equality comparison into an assignment } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* || ^~ = 1 warning generated. Remove the parentheses and while we're at it, clean up the commented code, which has been here since the beginning of git history. Link: ClangBuiltLinux#118 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
1 parent 02f17ff commit 864eb1a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/video/fbdev/sis/init301.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -848,9 +848,7 @@ SiS_PanelDelay(struct SiS_Private *SiS_Pr, unsigned short DelayTime)
848848
SiS_DDC2Delay(SiS_Pr, 0x4000);
849849
}
850850

851-
} else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* ||
852-
(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
853-
(SiS_Pr->SiS_CustomT == CUT_CLEVO1400) */ ) { /* 315 series, LVDS; Special */
851+
} else if (SiS_Pr->SiS_IF_DEF_LVDS == 1) { /* 315 series, LVDS; Special */
854852

855853
if(SiS_Pr->SiS_IF_DEF_CH70xx == 0) {
856854
PanelID = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);

0 commit comments

Comments
 (0)