All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] Unreachable Code
@ 2005-10-06  2:37 Aaron Grothe
  2005-10-08 13:21 ` Alexey Dobriyan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Aaron Grothe @ 2005-10-06  2:37 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

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

[-- Attachment #2: 2148707597-patch26.txt --]
[-- Type: text/plain, Size: 3133 bytes --]

diff -uprN -X dontdiff linux-2.6.14-rc3/drivers/char/drm/i830_dma.c linux-2.6.14-rc3-patch/drivers/char/drm/i830_dma.c
--- linux-2.6.14-rc3/drivers/char/drm/i830_dma.c	2005-10-04 11:19:44.000000000 +0200
+++ linux-2.6.14-rc3-patch/drivers/char/drm/i830_dma.c	2005-10-06 04:43:58.000000000 +0200
@@ -594,21 +594,6 @@ static void i830EmitTexPalette( drm_devi
 
 	return;
 
-	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.
diff -uprN -X dontdiff linux-2.6.14-rc3/fs/udf/super.c linux-2.6.14-rc3-patch/fs/udf/super.c
--- linux-2.6.14-rc3/fs/udf/super.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc3-patch/fs/udf/super.c	2005-10-06 04:45:13.000000000 +0200
@@ -793,55 +793,6 @@ udf_find_fileset(struct super_block *sb,
 		kernel_lb_addr newfileset;
 
 		return 1;
-		
-		for (newfileset.partitionReferenceNum=UDF_SB_NUMPARTS(sb)-1;
-			(newfileset.partitionReferenceNum != 0xFFFF &&
-				fileset->logicalBlockNum == 0xFFFFFFFF &&
-				fileset->partitionReferenceNum == 0xFFFF);
-			newfileset.partitionReferenceNum--)
-		{
-			lastblock = UDF_SB_PARTLEN(sb, newfileset.partitionReferenceNum);
-			newfileset.logicalBlockNum = 0;
-
-			do
-			{
-				bh = udf_read_ptagged(sb, newfileset, 0, &ident);
-				if (!bh)
-				{
-					newfileset.logicalBlockNum ++;
-					continue;
-				}
-
-				switch (ident)
-				{
-					case TAG_IDENT_SBD:
-					{
-						struct spaceBitmapDesc *sp;
-						sp = (struct spaceBitmapDesc *)bh->b_data;
-						newfileset.logicalBlockNum += 1 +
-							((le32_to_cpu(sp->numOfBytes) + sizeof(struct spaceBitmapDesc) - 1)
-								>> sb->s_blocksize_bits);
-						udf_release_data(bh);
-						break;
-					}
-					case TAG_IDENT_FSD:
-					{
-						*fileset = newfileset;
-						break;
-					}
-					default:
-					{
-						newfileset.logicalBlockNum ++;
-						udf_release_data(bh);
-						bh = NULL;
-						break;
-					}
-				}
-			}
-			while (newfileset.logicalBlockNum < lastblock &&
-				fileset->logicalBlockNum == 0xFFFFFFFF &&
-				fileset->partitionReferenceNum == 0xFFFF);
-		}
 	}
 
 	if ((fileset->logicalBlockNum != 0xFFFFFFFF ||
diff -uprN -X dontdiff linux-2.6.14-rc3/net/rxrpc/transport.c linux-2.6.14-rc3-patch/net/rxrpc/transport.c
--- linux-2.6.14-rc3/net/rxrpc/transport.c	2005-10-04 11:20:21.000000000 +0200
+++ linux-2.6.14-rc3-patch/net/rxrpc/transport.c	2005-10-06 04:45:59.000000000 +0200
@@ -563,8 +563,6 @@ void rxrpc_trans_receive_packet(struct r
 		kfree_skb(pkt);
 	}
 
-	_leave("");
-
 } /* end rxrpc_trans_receive_packet() */
 
 /*****************************************************************************/
@@ -848,7 +846,4 @@ static void rxrpc_trans_receive_error_re
 			rxrpc_put_peer(peer);
 		}
 	}
-
-	_leave("");
-	return;
 } /* end rxrpc_trans_receive_error_report() */

[-- Attachment #3: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [KJ] Unreachable Code
  2005-10-06  2:37 [KJ] Unreachable Code Aaron Grothe
@ 2005-10-08 13:21 ` Alexey Dobriyan
  2005-10-08 13:22 ` Alexey Dobriyan
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alexey Dobriyan @ 2005-10-08 13:21 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]

On Wed, Oct 05, 2005 at 07:37:54PM -0700, Aaron Grothe wrote:
> 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

> --- linux-2.6.14-rc3/drivers/char/drm/i830_dma.c
> +++ linux-2.6.14-rc3-patch/drivers/char/drm/i830_dma.c
> @@ -594,21 +594,6 @@ static void i830EmitTexPalette( drm_devi
>
>  	return;

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.

> -	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! 
> -	 */
>  }

> --- linux-2.6.14-rc3/fs/udf/super.c
> +++ linux-2.6.14-rc3-patch/fs/udf/super.c
> @@ -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.


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [KJ] Unreachable Code
  2005-10-06  2:37 [KJ] Unreachable Code Aaron Grothe
  2005-10-08 13:21 ` Alexey Dobriyan
@ 2005-10-08 13:22 ` Alexey Dobriyan
  2005-10-08 18:42 ` Matthew Wilcox
  2005-10-08 20:23 ` Alexey Dobriyan
  3 siblings, 0 replies; 5+ messages in thread
From: Alexey Dobriyan @ 2005-10-08 13:22 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 39 bytes --]

Oh, I'm awaiting Signed-off-by: line.


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [KJ] Unreachable Code
  2005-10-06  2:37 [KJ] Unreachable Code Aaron Grothe
  2005-10-08 13:21 ` Alexey Dobriyan
  2005-10-08 13:22 ` Alexey Dobriyan
@ 2005-10-08 18:42 ` Matthew Wilcox
  2005-10-08 20:23 ` Alexey Dobriyan
  3 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2005-10-08 18:42 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

On Wed, Oct 05, 2005 at 07:37:54PM -0700, Aaron Grothe wrote:
> +++ linux-2.6.14-rc3-patch/net/rxrpc/transport.c	2005-10-06 04:45:59.000000000 +0200
> @@ -563,8 +563,6 @@ void rxrpc_trans_receive_packet(struct r
>  		kfree_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)


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [KJ] Unreachable Code
  2005-10-06  2:37 [KJ] Unreachable Code Aaron Grothe
                   ` (2 preceding siblings ...)
  2005-10-08 18:42 ` Matthew Wilcox
@ 2005-10-08 20:23 ` Alexey Dobriyan
  3 siblings, 0 replies; 5+ messages in thread
From: Alexey Dobriyan @ 2005-10-08 20:23 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

On Sat, Oct 08, 2005 at 12:42:55PM -0600, Matthew Wilcox wrote:
> On Wed, Oct 05, 2005 at 07:37:54PM -0700, Aaron Grothe wrote:
> > +++ linux-2.6.14-rc3-patch/net/rxrpc/transport.c	2005-10-06 04:45:59.000000000 +0200
> > @@ -563,8 +563,6 @@ void rxrpc_trans_receive_packet(struct r
> >  		kfree_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)

How can you reach it without break;s from infinite loop?


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-10-08 20:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-06  2:37 [KJ] Unreachable Code Aaron Grothe
2005-10-08 13:21 ` Alexey Dobriyan
2005-10-08 13:22 ` Alexey Dobriyan
2005-10-08 18:42 ` Matthew Wilcox
2005-10-08 20:23 ` Alexey Dobriyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.