drivers/cdrom/gscd.c: kill dead code
PATCH 1/1 drivers/cdrom/gscd.c: kill dead code
This patch removes some obviously dead code found by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
drivers/cdrom/gscd.c renamed from drivers/cdrom/gscd.c.old +0 -4
@@ -694,12 +694,8 @@do { result =wait_drv_ready (); }while (result !=6 || result ==0x0E ); -if (result !=6 ) { -cmd_end (); -return ; - }#ifdef GSCD_DEBUG printk ("LOC_191 " );#endif
Quoted 8 lines · Adrian Bunk
This patch removes some obviously dead code found by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
drivers/cdrom/gscd.c line 701
Quoted 8 lines
drivers/cdrom/gscd.c renamed from drivers/cdrom/gscd.c.old +0
-4@@ -694,12 +694,8 @@do { result =wait_drv_ready (); }while (result !=6 || result ==0x0E ); -if (result !=6 ) { -cmd_end (); -return ; - }
I'd rather guess that (result != 6 || result == 0x0E) is borken, since it's equivalent to (result != 6).
Andreas.
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Quoted 14 lines · Andreas Schwab
Quoted 12 lines · Adrian Bunk
This patch removes some obviously dead code found by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>drivers/cdrom/gscd.c renamed from drivers/cdrom/gscd.c.old +0
-0@@ -694,12 +694,8 @@do { result =wait_drv_ready (); }while (result !=6 || result ==0x0E );
Quoted 7 lines
drivers/cdrom/gscd.c line 701
Quoted 4 lines
drivers/cdrom/gscd.c renamed from drivers/cdrom/gscd.c.old +0
-4-if (result !=6 ) { -cmd_end (); -return ; - }I'd rather guess that (result != 6 || result ==
0x0E) is borken, since it's equivalent to (result != 6).
This driver seems to be pretty unchanged for the last 10 years.
Unless someone really knows your assumption was correct, I'd prefer staying with the old behavior.
Quoted 1 line
Andreas.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed