archive mirror
 help / color / mirror / Atom feed
* re: video: fbdev: sis: Fix set but not used warnings in init.c
@ 2020-12-01 12:24 Colin Ian King
  0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2020-12-01 12:24 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Thomas Zimmermann, Lee Jones, Linux Fbdev development list


Static analysis on linux-next with Coverity had detected a minor issue
in the following commit:

commit 2a74e8682a39d00e04ca278459ae7d7ecbdfb394
Author: Sam Ravnborg <>
Date:   Sat Nov 28 23:40:55 2020 +0100

    video: fbdev: sis: Fix set but not used warnings in init.c

The analysis is as follows:

2659   if(SiS_Pr->UseCustomMode) {
2660      infoflag = SiS_Pr->CInfoFlag;
2661   } else {

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

2662      SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex);
2663      if(ModeNo > 0x13) {
2664         infoflag = SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag;
2665      }
2666   }

.. SiSGetResInfo() just returns an unsigned short and this returns a
values is not being used. The function does not side effect anything, so
it does look like a redundant call. Is this intentional?

3044 unsigned short
3045 SiS_GetResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex)
3046 {
3047   if(ModeNo <= 0x13)
3048      return ((unsigned
3049   else
3050      return ((unsigned
3051 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-01 12:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 12:24 video: fbdev: sis: Fix set but not used warnings in init.c Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).