diff mbox series

[v3,13/13] video: fbdev: sis: Drop useless call to SiS_GetResInfo()

Message ID 20201206190247.1861316-14-sam@ravnborg.org (mailing list archive)
State New, archived
Headers show
Series drivers/video: W=1 warning fixes | expand

Commit Message

Sam Ravnborg Dec. 6, 2020, 7:02 p.m. UTC
Coverity reported:

    Useless call (USELESS_CALL) side_effect_free: Calling
     SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex) is only useful for its
    return value, which is ignored.

And this is correct - so drop the call.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reported-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Useless call")
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
---
 drivers/video/fbdev/sis/init.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Thomas Zimmermann Dec. 7, 2020, 1:53 p.m. UTC | #1
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
> Coverity reported:
> 
>      Useless call (USELESS_CALL) side_effect_free: Calling
>       SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex) is only useful for its
>      return value, which is ignored.
> 
> And this is correct - so drop the call.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Reported-by: Colin Ian King <colin.king@canonical.com>
> Addresses-Coverity: ("Useless call")
> Cc: Colin Ian King <colin.king@canonical.com>
> Cc: Thomas Winischhofer <thomas@winischhofer.net>

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/video/fbdev/sis/init.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c
> index b77ea1a8825a..b568c646a76c 100644
> --- a/drivers/video/fbdev/sis/init.c
> +++ b/drivers/video/fbdev/sis/init.c
> @@ -2659,7 +2659,6 @@ SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
>      if(SiS_Pr->UseCustomMode) {
>         infoflag = SiS_Pr->CInfoFlag;
>      } else {
> -      SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex);
>         if(ModeNo > 0x13) {
>   	 infoflag = SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag;
>         }
>
diff mbox series

Patch

diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c
index b77ea1a8825a..b568c646a76c 100644
--- a/drivers/video/fbdev/sis/init.c
+++ b/drivers/video/fbdev/sis/init.c
@@ -2659,7 +2659,6 @@  SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
    if(SiS_Pr->UseCustomMode) {
       infoflag = SiS_Pr->CInfoFlag;
    } else {
-      SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex);
       if(ModeNo > 0x13) {
 	 infoflag = SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag;
       }