<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/video/fbdev/sis/init301.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-05-30T07:44:46Z</updated>
<entry>
<title>fbdev: sisfb: hide unused variables</title>
<updated>2024-05-30T07:44:46Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-04-03T08:06:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f3a0cd92c055623f40faae3d593f620071fc0a08'/>
<id>urn:sha1:f3a0cd92c055623f40faae3d593f620071fc0a08</id>
<content type='text'>
[ Upstream commit 688cf598665851b9e8cb5083ff1d208ce43d10ff ]

Building with W=1 shows that a couple of variables in this driver are only
used in certain configurations:

drivers/video/fbdev/sis/init301.c:239:28: error: 'SiS_Part2CLVX_6' defined but not used [-Werror=unused-const-variable=]
  239 | static const unsigned char SiS_Part2CLVX_6[] = {   /* 1080i */
      |                            ^~~~~~~~~~~~~~~
drivers/video/fbdev/sis/init301.c:230:28: error: 'SiS_Part2CLVX_5' defined but not used [-Werror=unused-const-variable=]
  230 | static const unsigned char SiS_Part2CLVX_5[] = {   /* 750p */
      |                            ^~~~~~~~~~~~~~~
drivers/video/fbdev/sis/init301.c:211:28: error: 'SiS_Part2CLVX_4' defined but not used [-Werror=unused-const-variable=]
  211 | static const unsigned char SiS_Part2CLVX_4[] = {   /* PAL */
      |                            ^~~~~~~~~~~~~~~
drivers/video/fbdev/sis/init301.c:192:28: error: 'SiS_Part2CLVX_3' defined but not used [-Werror=unused-const-variable=]
  192 | static const unsigned char SiS_Part2CLVX_3[] = {  /* NTSC, 525i, 525p */
      |                            ^~~~~~~~~~~~~~~
drivers/video/fbdev/sis/init301.c:184:28: error: 'SiS_Part2CLVX_2' defined but not used [-Werror=unused-const-variable=]
  184 | static const unsigned char SiS_Part2CLVX_2[] = {
      |                            ^~~~~~~~~~~~~~~
drivers/video/fbdev/sis/init301.c:176:28: error: 'SiS_Part2CLVX_1' defined but not used [-Werror=unused-const-variable=]
  176 | static const unsigned char SiS_Part2CLVX_1[] = {
      |                            ^~~~~~~~~~~~~~~

This started showing up after the definitions were moved into the
source file from the header, which was not flagged by the compiler.
Move the definition into the appropriate #ifdef block that already
exists next to them.

Fixes: 5908986ef348 ("video: fbdev: sis: avoid mismatched prototypes")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>video: fbdev: sis: Remove unnecessary parentheses and commented code</title>
<updated>2018-10-08T10:57:36Z</updated>
<author>
<name>Nathan Chancellor</name>
<email>natechancellor@gmail.com</email>
</author>
<published>2018-10-08T10:57:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=864eb1afc60cb43e7df879b97f8ca0d719bbb735'/>
<id>urn:sha1:864eb1afc60cb43e7df879b97f8ca0d719bbb735</id>
<content type='text'>
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-&gt;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-&gt;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-&gt;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 &lt;natechancellor@gmail.com&gt;
Cc: Thomas Winischhofer &lt;thomas@winischhofer.net&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: sis: avoid mismatched prototypes</title>
<updated>2018-03-12T16:06:52Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-03-12T16:06:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5908986ef3481b7ac783642733a4ab91c15c7550'/>
<id>urn:sha1:5908986ef3481b7ac783642733a4ab91c15c7550</id>
<content type='text'>
Building with LTO enabled reveals some functions whose prototypes
in the header are different from the definition:

drivers/video/fbdev/sis/sis_main.h:765:0: error: type of 'SiS_SetCH70xxANDOR' does not match original declaration [-Werror=lto-type-mismatch]
 extern void  SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,

drivers/video/fbdev/sis/init301.c:8937:0: note: type mismatch in parameter 4
 SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,

drivers/video/fbdev/sis/init301.c:8937:0: note: type 'short unsigned int' should match type 'unsigned char'
drivers/video/fbdev/sis/init301.c:8937:0: note: 'SiS_SetCH70xxANDOR' was previously declared here

The root cause appears to be the way that header files are used in this
driver, where they contain both static variable and declarations for
symbols in other files.

To clean that up, I'm changing all mixed headers to only contain
declarations the way we normally do in C, or contain only static
variables, and move the rest to a more appropriate place.  Once that
is done, the headers can be included in the other files as well, and
guarantee that the prototypes match.

There are a few headers that now only contain static variables, and
I'm leaving those alone here as the patch is already too big. These
could be trivially moved into the respective .c files.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Thomas Winischhofer &lt;thomas@winischhofer.net&gt;
Cc: Nicolas Pitre &lt;nico@linaro.org&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: "Gustavo A. R. Silva" &lt;gustavo@embeddedor.com&gt;,
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: sis: make const array specialtv static, reduces object code size</title>
<updated>2017-10-12T16:18:23Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-10-12T16:18:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b90b3eca16b7ba6f42df35c029b674f1a00b0c69'/>
<id>urn:sha1:b90b3eca16b7ba6f42df35c029b674f1a00b0c69</id>
<content type='text'>
Don't populate the const array specialtv on the stack, instead make it
static.  Makes the object code smaller by over 1100 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
 179899	   7504	      0	 187403	  2dc0b	drivers/video/fbdev/sis/init301.o

After:
   text	   data	    bss	    dec	    hex	filename
 178720	   7568	      0	 186288	  2d7b0	drivers/video/fbdev/sis/init301.o

(gcc version 7.2.0, x86_64)

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Cc: Thomas Winischhofer &lt;thomas@winischhofer.net&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: sis: fix duplicated code for different branches</title>
<updated>2017-09-04T14:00:50Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2017-09-04T14:00:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d3e329b3156699bd85d1aa7a5f792cd38d6a5fd3'/>
<id>urn:sha1:d3e329b3156699bd85d1aa7a5f792cd38d6a5fd3</id>
<content type='text'>
Refactor code in order to avoid identical code for different branches.

This issue was detected with the help of Coccinelle.

Addresses-Coverity-ID: 1226761
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Cc: Thomas Winischhofer &lt;thomas@winischhofer.net&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: sis: remove unused variable</title>
<updated>2016-03-03T11:38:29Z</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2016-02-29T18:02:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=32ad61951574d011d363694d6037592e99da9421'/>
<id>urn:sha1:32ad61951574d011d363694d6037592e99da9421</id>
<content type='text'>
The variables modeflag and resinfo were only assigned some value but
were never used.

Signed-off-by: Sudip Mukherjee &lt;sudip.mukherjee@codethink.co.uk&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: sis: delete double assignment</title>
<updated>2014-08-26T12:53:35Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2014-08-23T18:33:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a9a3cac6908a86ada51ab12f7eb39d0313814d23'/>
<id>urn:sha1:a9a3cac6908a86ada51ab12f7eb39d0313814d23</id>
<content type='text'>
Delete successive assignments to the same location.  The second assignment
is changed to update a different field, as done in other nearby code.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression i;
@@

*i = ...;
 i = ...;
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
</content>
</entry>
<entry>
<title>video: move fbdev to drivers/video/fbdev</title>
<updated>2014-04-17T05:10:19Z</updated>
<author>
<name>Tomi Valkeinen</name>
<email>tomi.valkeinen@ti.com</email>
</author>
<published>2014-02-13T13:31:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f7018c21350204c4cf628462f229d44d03545254'/>
<id>urn:sha1:f7018c21350204c4cf628462f229d44d03545254</id>
<content type='text'>
The drivers/video directory is a mess. It contains generic video related
files, directories for backlight, console, linux logo, lots of fbdev
device drivers, fbdev framework files.

Make some order into the chaos by creating drivers/video/fbdev
directory, and move all fbdev related files there.

No functionality is changed, although I guess it is possible that some
subtle Makefile build order related issue could be created by this
patch.

Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Rob Clark &lt;robdclark@gmail.com&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
</feed>
