video: fbdev: sis: use explicitly signed char
Subsystems (4)
PATCH 1/1 video: fbdev: sis: use explicitly signed char
With char becoming unsigned by default, and with char alone being ambiguous and based on architecture, signed chars need to be marked explicitly as such. This fixes warnings like:
drivers/video/fbdev/sis/init301.c:3549 SiS_GetCRT2Data301() warn: 'SiS_Pr->SiS_EModeIDTable[ModeIdIndex]->ROMMODEIDX661' is unsigned
--- drivers/usb/misc/sisusbvga/sisusb_struct.h | 2 +- drivers/video/fbdev/sis/vstruct.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/misc/sisusbvga/sisusb_struct.h +1 -1
@@ -91,7 +91,7 @@ struct SiS_Ext {unsigned char VB_ExtTVYFilterIndex;unsigned char VB_ExtTVYFilterIndexROM661;unsigned char REFindex; -char ROMMODEIDX661 ; +signed char ROMMODEIDX661 ; };struct SiS_Ext2 {
drivers/video/fbdev/sis/vstruct.h +1 -1
@@ -148,7 +148,7 @@ struct SiS_Ext {unsigned char VB_ExtTVYFilterIndex;unsigned char VB_ExtTVYFilterIndexROM661;unsigned char REFindex; -char ROMMODEIDX661 ; +signed char ROMMODEIDX661 ; };struct SiS_Ext2 {
Signature · 1 line
2.38.1
Quoted 6 lines · Jason A. Donenfeld
With char becoming unsigned by default, and with
charalone being ambiguous and based on architecture, signed chars need to be marked explicitly as such. This fixes warnings like:
drivers/video/fbdev/sis/init301.c:3549SiS_GetCRT2Data301()warn: 'SiS_Pr->SiS_EModeIDTable[ModeIdIndex]->ROMMODEIDX661' is unsigned
Quoted 7 lines
Cc Thomas Winischhofer <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Helge Deller <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>
Applied to linux-fbdev git tree.
Thanks,
Helge
Quoted 31 lines
--- drivers/usb/misc/sisusbvga/sisusb_struct.h | 2 +- drivers/video/fbdev/sis/vstruct.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/usb/misc/sisusbvga/sisusb_struct.h +1
-1@@ -91,7 +91,7 @@ struct SiS_Ext {unsigned char VB_ExtTVYFilterIndex;unsigned char VB_ExtTVYFilterIndexROM661;unsigned char REFindex; -char ROMMODEIDX661 ; +signed char ROMMODEIDX661 ; };struct SiS_Ext2 {drivers/video/fbdev/sis/vstruct.h +1
-1@@ -148,7 +148,7 @@ struct SiS_Ext {unsigned char VB_ExtTVYFilterIndex;unsigned char VB_ExtTVYFilterIndexROM661;unsigned char REFindex; -char ROMMODEIDX661 ; +signed char ROMMODEIDX661 ; };struct SiS_Ext2 {
Quoted 16 lines · Helge Deller
Quoted 6 lines · Jason A. Donenfeld
With char becoming unsigned by default, and with
charalone being ambiguous and based on architecture, signed chars need to be marked explicitly as such. This fixes warnings like:
drivers/video/fbdev/sis/init301.c:3549SiS_GetCRT2Data301()warn: 'SiS_Pr->SiS_EModeIDTable[ModeIdIndex]->ROMMODEIDX661' is unsignedQuoted 7 lines
Cc Thomas Winischhofer <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Helge Deller <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>
Quoted 1 line
Applied to linux-fbdev git tree.
For 6.1 as a fix, right? Since this is already broken on, e.g., ARM.
Jason
Helge Deller
maintainerQuoted 17 lines · Jason A. Donenfeld
Quoted 16 lines · Helge Deller
Quoted 13 lines · Jason A. Donenfeld
With char becoming unsigned by default, and with
charalone being ambiguous and based on architecture, signed chars need to be marked explicitly as such. This fixes warnings like:
drivers/video/fbdev/sis/init301.c:3549SiS_GetCRT2Data301()warn: 'SiS_Pr->SiS_EModeIDTable[ModeIdIndex]->ROMMODEIDX661' is unsignedCc Thomas Winischhofer <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Helge Deller <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>
Quoted 3 lines
Quoted 1 line
Applied to linux-fbdev git tree.
For 6.1 as a fix, right? Since this is already broken on, e.g., ARM.
Yes.
Helge
From: Jason A. Donenfeld
Quoted 7 lines
Sent: 24 October 2022 17:29
To: [email protected]With char becoming unsigned by default, and with
charalone being ambiguous and based on architecture, signed chars need to be marked explicitly as such. This fixes warnings like:
...
Quoted 10 lines
--- drivers/usb/misc/sisusbvga/sisusb_struct.h | 2 +- drivers/video/fbdev/sis/vstruct.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/usb/misc/sisusbvga/sisusb_struct.h +0
-0
drivers/usb/misc/sisusbvga/sisusb_struct.h struct SiS_Ext { · line 94
Quoted 5 lines
drivers/usb/misc/sisusbvga/sisusb_struct.h +1
-1@@ -91,7 +91,7 @@ struct SiS_Ext {unsigned char VB_ExtTVYFilterIndex;unsigned char VB_ExtTVYFilterIndexROM661;unsigned char REFindex; -char ROMMODEIDX661 ; +signed char ROMMODEIDX661 ;
Isn't the correct fix to use u8 and s8 ?
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)