mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] proc: fix duplicate line in /proc/devices
@ 2006-03-22 13:25 Neil Horman
  2006-03-22 19:12 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Horman @ 2006-03-22 13:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, joe.korty

Patch to fix a potential duplicate block device line printed after the "Block
device" header in /proc/devices.  Tested and confirmed working by the reporter.

Regards
Neil

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>


 proc_misc.c |    1 -
 1 files changed, 1 deletion(-)


diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 1d24fea..b097958 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -312,7 +312,6 @@ static void *devinfo_next(struct seq_fil
 		case BLK_HDR:
 			info->state = BLK_LIST;
 			(*pos)++;
-			break;
 		case BLK_LIST:
 			if (get_blkdev_info(info->blkdev,&idummy,&ndummy)) {
 				/*
-- 
/***************************************************
 *Neil Horman
 *Software Engineer
 *gpg keyid: 1024D / 0x92A74FA1 - http://pgp.mit.edu
 ***************************************************/

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

* Re: [PATCH] proc: fix duplicate line in /proc/devices
  2006-03-22 13:25 [PATCH] proc: fix duplicate line in /proc/devices Neil Horman
@ 2006-03-22 19:12 ` Andrew Morton
  2006-03-22 19:22   ` Neil Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2006-03-22 19:12 UTC (permalink / raw)
  To: Neil Horman; +Cc: linux-kernel, joe.korty

Neil Horman <nhorman@tuxdriver.com> wrote:
>
> Patch to fix a potential duplicate block device line printed after the "Block
> device" header in /proc/devices.  Tested and confirmed working by the reporter.
> 

<looks>

Block devices:
  1 ramdisk
  1 ramdisk
  2 fd
  8 sd

> 
> diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
> index 1d24fea..b097958 100644
> --- a/fs/proc/proc_misc.c
> +++ b/fs/proc/proc_misc.c
> @@ -312,7 +312,6 @@ static void *devinfo_next(struct seq_fil
>  		case BLK_HDR:
>  			info->state = BLK_LIST;
>  			(*pos)++;
> -			break;
>  		case BLK_LIST:
>  			if (get_blkdev_info(info->blkdev,&idummy,&ndummy)) {
>  				/*

OK, so that's the same as CHR_HDR and lines up with the fallthroughs in
devinfo_show().  A somewhat strange way of implementing a state machine,
but I guess it saves a few cycles...

I'll copy the stable-kernel guys - this is 2.6.16.1 material, thanks.

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

* Re: [PATCH] proc: fix duplicate line in /proc/devices
  2006-03-22 19:12 ` Andrew Morton
@ 2006-03-22 19:22   ` Neil Horman
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Horman @ 2006-03-22 19:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, joe.korty

On Wed, Mar 22, 2006 at 11:12:31AM -0800, Andrew Morton wrote:
> Neil Horman <nhorman@tuxdriver.com> wrote:
> >
> > Patch to fix a potential duplicate block device line printed after the "Block
> > device" header in /proc/devices.  Tested and confirmed working by the reporter.
> > 
> 
> <looks>
> 
> Block devices:
>   1 ramdisk
>   1 ramdisk
>   2 fd
>   8 sd
> 
> > 
> > diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
> > index 1d24fea..b097958 100644
> > --- a/fs/proc/proc_misc.c
> > +++ b/fs/proc/proc_misc.c
> > @@ -312,7 +312,6 @@ static void *devinfo_next(struct seq_fil
> >  		case BLK_HDR:
> >  			info->state = BLK_LIST;
> >  			(*pos)++;
> > -			break;
> >  		case BLK_LIST:
> >  			if (get_blkdev_info(info->blkdev,&idummy,&ndummy)) {
> >  				/*
> 
> OK, so that's the same as CHR_HDR and lines up with the fallthroughs in
> devinfo_show().  A somewhat strange way of implementing a state machine,
> but I guess it saves a few cycles...
> 
> I'll copy the stable-kernel guys - this is 2.6.16.1 material, thanks.
Fantastic.  Thanks Andrew.
Neil

> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
/***************************************************
 *Neil Horman
 *Software Engineer
 *gpg keyid: 1024D / 0x92A74FA1 - http://pgp.mit.edu
 ***************************************************/

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

end of thread, other threads:[~2006-03-22 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-22 13:25 [PATCH] proc: fix duplicate line in /proc/devices Neil Horman
2006-03-22 19:12 ` Andrew Morton
2006-03-22 19:22   ` Neil Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®