drivers: usb-misc: sisusbvga: remove dead code
Subsystems (2)
PATCH 1/1 drivers: usb-misc: sisusbvga: remove dead code
The condition modex % 16 cannot be true when modex value is equal to 640 The condition du & 0xff cannot be true when du value is equal to 0x1400
Addresses-Coverity-Id: 101163
Addresses-Coverity-Id: 744373
--- drivers/usb/misc/sisusbvga/sisusb.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/usb/misc/sisusbvga/sisusb.c +0 -6
@@ -1831,16 +1831,10 @@ static int sisusb_set_default_mode(struct sisusb_usb_data *sisusb,SETIREGANDOR (SISCR ,0x09 ,0x5f , ((crtcdata[16 ] &0x01 ) <<5 ));SETIREG (SISCR ,0x14 ,0x4f ); du = (modex /16 ) * (bpp *2 );/* offset/pitch */ -if (modex %16 ) - du += bpp; -SETIREGANDOR (SISSR ,0x0e ,0xf0 , ((du >>8 ) &0x0f ));SETIREG (SISCR ,0x13 , (du &0xff )); du <<=5 ; tmp8 = du >>8 ; -if (du &0xff ) - tmp8++; -SETIREG (SISSR ,0x10 , tmp8);SETIREG (SISSR ,0x31 ,0x00 );/* VCLK */ SETIREG (SISSR ,0x2b ,0x1b );
Signature · 1 line
2.5.0
Am Dienstag, den 07.02.2017, 22:01 -0600 schrieb Gustavo A. R. Silva:
Quoted 5 lines
The condition modex % 16 cannot be true when modex value is equal to 640
The condition du &0xffcannot be true when du value is equal to0x1400
Sorry for speaking up so late, but this is not a good idea. We lose the knowledge how to do this correctly, if we want to change the resolution.
Regards
Oliver
Greg KH
maintainerQuoted 10 lines · Oliver Neukum
Am Dienstag, den 07.02.2017, 22:01 -0600 schrieb Gustavo A. R. Silva:
Quoted 5 lines
The condition modex % 16 cannot be true when modex value is equal to 640
The condition du &0xffcannot be true when du value is equal to0x1400Sorry for speaking up so late, but this is not a good idea. We lose the knowledge how to do this correctly, if we want to change the resolution.
Given the age of this driver, I doubt that will ever happen :)
thanks,
greg k-h
Hi,
Quoted 8 lines · Greg KH
Quoted 7 lines · Oliver Neukum
Am Dienstag, den 07.02.2017, 22:01 -0600 schrieb Gustavo A. R. Silva:
Quoted 5 lines
The condition modex % 16 cannot be true when modex value is equal to 640
The condition du &0xffcannot be true when du value is equal to0x1400
Quoted 5 lines
Quoted 3 lines
Sorry for speaking up so late, but this is not a good idea. We lose the knowledge how to do this correctly, if we want to change the resolution.
Given the age of this driver, I doubt that will ever happen :)
besides, the "knowledge" will always be in git history.
Signature · 1 line
balbi