Unreachable Code
Subsystems (5)
Hi,
The following is a small patch against the 2.6.14-rc3 tree. It removes some code that won't/can't be reached. I came across the code while building the kernel with the Intel C compiler.
I've thrown a couple of quick webpages and a little project on sourceforge up at http://www.linuxicc.org
with some more of the "interesting" results from using Intel's compiler. I think with Intel's compiler reporting a couple of things than gcc it might lead to some interesting results.
Regards,
Aaron
=-=-=
"The Journey is the Reward" - Old Zen Buddhist Saying
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
drivers/char/drm/i830_dma.c +0 -15
@@ -594,21 +594,6 @@ static void i830EmitTexPalette( drm_devireturn ; -BEGIN_LP_RING (258 ); - -if (is_shared ==1 ) { -OUT_RING (CMD_OP_MAP_PALETTE_LOAD | -MAP_PALETTE_NUM (0 ) | -MAP_PALETTE_BOTH ); - }else { -OUT_RING (CMD_OP_MAP_PALETTE_LOAD |MAP_PALETTE_NUM (number)); - } -for (i =0 ; i <256 ; i++) { -OUT_RING (palette[i]); - } -OUT_RING (0 ); -/* KW: WHERE IS THE ADVANCE_LP_RING? This is effectively a noop! -*/ }/* Need to do some additional checking when setting the dest buffer.
fs/udf/super.c +0 -49
55 lines not on this page · raw message
net/rxrpc/transport.c +0 -5
@@ -563,8 +563,6 @@ void rxrpc_trans_receive_packet(struct rkfree_skb (pkt); } -_leave ("" ); - }/* end rxrpc_trans_receive_packet() */ /*****************************************************************************/
@@ -848,7 +846,4 @@ static void rxrpc_trans_receive_error_rerxrpc_put_peer (peer); } } - -_leave ("" ); -return ; }/* end rxrpc_trans_receive_error_report() */
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
drivers/char/drm/i830_dma.c static void i830EmitTexPalette( drm_devi · line 595
Quoted 9 lines · Aaron Grothe
The following is a small patch against the 2.6.14-rc3 tree. It removes some code that won't/can't be reached. I came across the code while building the
drivers/char/drm/i830_dma.c +0
-0@@ -594,21 +594,6 @@ static void i830EmitTexPalette( drm_devireturn ;
Placed here on 29 Mar 2003, so it should be safe to remove. But after removal i830EmitTexPalette() will become NOP. Applied as-is, send incremental patch if i830 people will say i830EmitTexPalette() is a dead code nobody will fix.
Quoted 20 lines
drivers/char/drm/i830_dma.c +0
-15-BEGIN_LP_RING (258 ); - -if (is_shared ==1 ) { -OUT_RING (CMD_OP_MAP_PALETTE_LOAD | -MAP_PALETTE_NUM (0 ) | -MAP_PALETTE_BOTH ); - }else { -OUT_RING (CMD_OP_MAP_PALETTE_LOAD |MAP_PALETTE_NUM (number)); - } -for (i =0 ; i <256 ; i++) { -OUT_RING (palette[i]); - } -OUT_RING (0 ); -/* KW: WHERE IS THE ADVANCE_LP_RING? This is effectively a noop! -*/ }
fs/udf/super.c udf_find_fileset(struct super_block *sb, · line 795
Quoted 3 lines
fs/udf/super.c +0
-0@@ -793,55 +793,6 @@ udf_find_fileset(struct super_block *sb,kernel_lb_addr newfileset;return 1 ;
5 Feb 2002. OK. Note that newfileset will become unused.
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Oh, I'm awaiting Signed-off-by: line.
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
net/rxrpc/transport.c void rxrpc_trans_receive_packet(struct r · line 566
Quoted 8 lines · Aaron Grothe
+++
linux-2.6.14-rc3-patch/net/rxrpc/transport.c2005-10-06 04:45:59.000000000 +0200net/rxrpc/transport.c +0
-2@@ -563,8 +563,6 @@ void rxrpc_trans_receive_packet(struct rkfree_skb (pkt); } -_leave ("" ); - }/* end rxrpc_trans_receive_packet() */
Why delete these? They seem to be useful:
#define _leave(FMT, a...) do { if (rxrpc_ktrace) kleave(FMT , ##a); } while(0)
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 6 lines · Matthew Wilcox
Quoted 5 lines · Aaron Grothe
+++
linux-2.6.14-rc3-patch/net/rxrpc/transport.c2005-10-06 04:45:59.000000000 +0200net/rxrpc/transport.c +0
-0@@ -563,8 +563,6 @@ void rxrpc_trans_receive_packet(struct rkfree_skb (pkt); }
Quoted 7 lines
net/rxrpc/transport.c void rxrpc_trans_receive_packet(struct r · line 566
Quoted 3 lines
net/rxrpc/transport.c +0
-2-_leave ("" ); - }/* end rxrpc_trans_receive_packet() */ Why delete these? They seem to be useful:
#define
_leave(FMT, a...)do { if (rxrpc_ktrace)kleave(FMT , ##a); } while(0)
How can you reach it without break;s from infinite loop?
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors