]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
video: fbdev: sis: Remove unnecessary parentheses and commented code
authorNathan Chancellor <natechancellor@gmail.com>
Mon, 8 Oct 2018 10:57:36 +0000 (12:57 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 14 May 2020 08:53:56 +0000 (10:53 +0200)
BugLink: https://bugs.launchpad.net/bugs/1875506
commit 864eb1afc60cb43e7df879b97f8ca0d719bbb735 upstream.

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: https://github.com/ClangBuiltLinux/linux/issues/118
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/video/fbdev/sis/init301.c

index 02ee752d5000567148cf24a174471b559cfc80b1..fd5c2113a244e64e25929311b3eacd47fb3b9cee 100644 (file)
@@ -522,9 +522,7 @@ SiS_PanelDelay(struct SiS_Private *SiS_Pr, unsigned short DelayTime)
            SiS_DDC2Delay(SiS_Pr, 0x4000);
         }
 
-      } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* ||
-        (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-        (SiS_Pr->SiS_CustomT == CUT_CLEVO1400) */ ) {                  /* 315 series, LVDS; Special */
+      } else if (SiS_Pr->SiS_IF_DEF_LVDS == 1) {                       /* 315 series, LVDS; Special */
 
         if(SiS_Pr->SiS_IF_DEF_CH70xx == 0) {
            PanelID = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);