Linux PARISC architecture development
 help / color / mirror / Atom feed
* [RFC] remove dead code from sys_parisc32.c
@ 2008-08-17  2:41 Christoph Hellwig
  2008-08-18 20:44 ` Grant Grundler
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Christoph Hellwig @ 2008-08-17  2:41 UTC (permalink / raw)
  To: linux-parisc

Unless I'm totally missing something get_fd_set32/set_fd_set32 are
completely unused.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/arch/parisc/kernel/sys_parisc32.c
===================================================================
--- linux-2.6.orig/arch/parisc/kernel/sys_parisc32.c	2008-08-16 23:40:26.000000000 -0300
+++ linux-2.6/arch/parisc/kernel/sys_parisc32.c	2008-08-16 23:40:46.000000000 -0300
@@ -284,68 +284,6 @@ int cp_compat_stat(struct kstat *stat, s
 	return err;
 }
 
-/*** copied from mips64 ***/
-/*
- * Ooo, nasty.  We need here to frob 32-bit unsigned longs to
- * 64-bit unsigned longs.
- */
-
-static inline int
-get_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
-{
-	n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
-	if (ufdset) {
-		unsigned long odd;
-
-		if (!access_ok(VERIFY_WRITE, ufdset, n*sizeof(u32)))
-			return -EFAULT;
-
-		odd = n & 1UL;
-		n &= ~1UL;
-		while (n) {
-			unsigned long h, l;
-			__get_user(l, ufdset);
-			__get_user(h, ufdset+1);
-			ufdset += 2;
-			*fdset++ = h << 32 | l;
-			n -= 2;
-		}
-		if (odd)
-			__get_user(*fdset, ufdset);
-	} else {
-		/* Tricky, must clear full unsigned long in the
-		 * kernel fdset at the end, this makes sure that
-		 * actually happens.
-		 */
-		memset(fdset, 0, ((n + 1) & ~1)*sizeof(u32));
-	}
-	return 0;
-}
-
-static inline void
-set_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
-{
-	unsigned long odd;
-	n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
-
-	if (!ufdset)
-		return;
-
-	odd = n & 1UL;
-	n &= ~1UL;
-	while (n) {
-		unsigned long h, l;
-		l = *fdset++;
-		h = l >> 32;
-		__put_user(l, ufdset);
-		__put_user(h, ufdset+1);
-		ufdset += 2;
-		n -= 2;
-	}
-	if (odd)
-		__put_user(*fdset, ufdset);
-}

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

* Re: [RFC] remove dead code from sys_parisc32.c
  2008-08-17  2:41 [RFC] remove dead code from sys_parisc32.c Christoph Hellwig
@ 2008-08-18 20:44 ` Grant Grundler
  2008-08-20  3:44 ` Kyle McMartin
  2008-11-05 14:08 ` Christoph Hellwig
  2 siblings, 0 replies; 10+ messages in thread
From: Grant Grundler @ 2008-08-18 20:44 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-parisc

On Sun, Aug 17, 2008 at 04:41:51AM +0200, Christoph Hellwig wrote:
> Unless I'm totally missing something get_fd_set32/set_fd_set32 are
> completely unused.

I think get_fd_set32 was replaced by compat_get_fd_set.
In any case, I didn't find any users either.

> Signed-off-by: Christoph Hellwig <hch@lst.de>

Ack-by: Grant Grundler <grundler@parisc-linux.org>

thanks,
grant

> 
> Index: linux-2.6/arch/parisc/kernel/sys_parisc32.c
> ===================================================================
> --- linux-2.6.orig/arch/parisc/kernel/sys_parisc32.c	2008-08-16 23:40:26.000000000 -0300
> +++ linux-2.6/arch/parisc/kernel/sys_parisc32.c	2008-08-16 23:40:46.000000000 -0300
> @@ -284,68 +284,6 @@ int cp_compat_stat(struct kstat *stat, s
>  	return err;
>  }
>  
> -/*** copied from mips64 ***/
> -/*
> - * Ooo, nasty.  We need here to frob 32-bit unsigned longs to
> - * 64-bit unsigned longs.
> - */
> -
> -static inline int
> -get_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
> -{
> -	n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
> -	if (ufdset) {
> -		unsigned long odd;
> -
> -		if (!access_ok(VERIFY_WRITE, ufdset, n*sizeof(u32)))
> -			return -EFAULT;
> -
> -		odd = n & 1UL;
> -		n &= ~1UL;
> -		while (n) {
> -			unsigned long h, l;
> -			__get_user(l, ufdset);
> -			__get_user(h, ufdset+1);
> -			ufdset += 2;
> -			*fdset++ = h << 32 | l;
> -			n -= 2;
> -		}
> -		if (odd)
> -			__get_user(*fdset, ufdset);
> -	} else {
> -		/* Tricky, must clear full unsigned long in the
> -		 * kernel fdset at the end, this makes sure that
> -		 * actually happens.
> -		 */
> -		memset(fdset, 0, ((n + 1) & ~1)*sizeof(u32));
> -	}
> -	return 0;
> -}
> -
> -static inline void
> -set_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
> -{
> -	unsigned long odd;
> -	n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
> -
> -	if (!ufdset)
> -		return;
> -
> -	odd = n & 1UL;
> -	n &= ~1UL;
> -	while (n) {
> -		unsigned long h, l;
> -		l = *fdset++;
> -		h = l >> 32;
> -		__put_user(l, ufdset);
> -		__put_user(h, ufdset+1);
> -		ufdset += 2;
> -		n -= 2;
> -	}
> -	if (odd)
> -		__put_user(*fdset, ufdset);
> -}
> -
>  struct msgbuf32 {
>      int mtype;
>      char mtext[1];
> --
> To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC] remove dead code from sys_parisc32.c
  2008-08-17  2:41 [RFC] remove dead code from sys_parisc32.c Christoph Hellwig
  2008-08-18 20:44 ` Grant Grundler
@ 2008-08-20  3:44 ` Kyle McMartin
  2008-11-05 14:08 ` Christoph Hellwig
  2 siblings, 0 replies; 10+ messages in thread
From: Kyle McMartin @ 2008-08-20  3:44 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-parisc

On Sun, Aug 17, 2008 at 04:41:51AM +0200, Christoph Hellwig wrote:
> Unless I'm totally missing something get_fd_set32/set_fd_set32 are
> completely unused.
> 

thanks, hch.

cheers, kyle

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

* Re: [RFC] remove dead code from sys_parisc32.c
  2008-08-17  2:41 [RFC] remove dead code from sys_parisc32.c Christoph Hellwig
  2008-08-18 20:44 ` Grant Grundler
  2008-08-20  3:44 ` Kyle McMartin
@ 2008-11-05 14:08 ` Christoph Hellwig
  2008-11-05 15:10   ` Kyle McMartin
  2009-06-08  7:37   ` Christoph Hellwig
  2 siblings, 2 replies; 10+ messages in thread
From: Christoph Hellwig @ 2008-11-05 14:08 UTC (permalink / raw)
  To: linux-parisc

Anyone wants to pick this one up?

On Sun, Aug 17, 2008 at 04:41:51AM +0200, Christoph Hellwig wrote:
> Unless I'm totally missing something get_fd_set32/set_fd_set32 are
> completely unused.
> 
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: linux-2.6/arch/parisc/kernel/sys_parisc32.c
> ===================================================================
> --- linux-2.6.orig/arch/parisc/kernel/sys_parisc32.c	2008-08-16 23:40:26.000000000 -0300
> +++ linux-2.6/arch/parisc/kernel/sys_parisc32.c	2008-08-16 23:40:46.000000000 -0300
> @@ -284,68 +284,6 @@ int cp_compat_stat(struct kstat *stat, s
>  	return err;
>  }
>  
> -/*** copied from mips64 ***/
> -/*
> - * Ooo, nasty.  We need here to frob 32-bit unsigned longs to
> - * 64-bit unsigned longs.
> - */
> -
> -static inline int
> -get_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
> -{
> -	n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
> -	if (ufdset) {
> -		unsigned long odd;
> -
> -		if (!access_ok(VERIFY_WRITE, ufdset, n*sizeof(u32)))
> -			return -EFAULT;
> -
> -		odd = n & 1UL;
> -		n &= ~1UL;
> -		while (n) {
> -			unsigned long h, l;
> -			__get_user(l, ufdset);
> -			__get_user(h, ufdset+1);
> -			ufdset += 2;
> -			*fdset++ = h << 32 | l;
> -			n -= 2;
> -		}
> -		if (odd)
> -			__get_user(*fdset, ufdset);
> -	} else {
> -		/* Tricky, must clear full unsigned long in the
> -		 * kernel fdset at the end, this makes sure that
> -		 * actually happens.
> -		 */
> -		memset(fdset, 0, ((n + 1) & ~1)*sizeof(u32));
> -	}
> -	return 0;
> -}
> -
> -static inline void
> -set_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
> -{
> -	unsigned long odd;
> -	n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
> -
> -	if (!ufdset)
> -		return;
> -
> -	odd = n & 1UL;
> -	n &= ~1UL;
> -	while (n) {
> -		unsigned long h, l;
> -		l = *fdset++;
> -		h = l >> 32;
> -		__put_user(l, ufdset);
> -		__put_user(h, ufdset+1);
> -		ufdset += 2;
> -		n -= 2;
> -	}
> -	if (odd)
> -		__put_user(*fdset, ufdset);
> -}
> -
>  struct msgbuf32 {
>      int mtype;
>      char mtext[1];
---end quoted text---

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

* Re: [RFC] remove dead code from sys_parisc32.c
  2008-11-05 14:08 ` Christoph Hellwig
@ 2008-11-05 15:10   ` Kyle McMartin
  2009-06-08  7:37   ` Christoph Hellwig
  1 sibling, 0 replies; 10+ messages in thread
From: Kyle McMartin @ 2008-11-05 15:10 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-parisc

On Wed, Nov 05, 2008 at 03:08:10PM +0100, Christoph Hellwig wrote:
> Anyone wants to pick this one up?
> 
> On Sun, Aug 17, 2008 at 04:41:51AM +0200, Christoph Hellwig wrote:
> > Unless I'm totally missing something get_fd_set32/set_fd_set32 are
> > completely unused.
> > 

Heh, sorry. Applied.

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

* Re: [RFC] remove dead code from sys_parisc32.c
  2008-11-05 14:08 ` Christoph Hellwig
  2008-11-05 15:10   ` Kyle McMartin
@ 2009-06-08  7:37   ` Christoph Hellwig
  2009-06-08 14:17     ` John David Anglin
  1 sibling, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2009-06-08  7:37 UTC (permalink / raw)
  To: linux-parisc

ping?

On Wed, Nov 05, 2008 at 03:08:10PM +0100, Christoph Hellwig wrote:
> Anyone wants to pick this one up?
> 
> On Sun, Aug 17, 2008 at 04:41:51AM +0200, Christoph Hellwig wrote:
> > Unless I'm totally missing something get_fd_set32/set_fd_set32 are
> > completely unused.
> > 
> > 
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > 
> > Index: linux-2.6/arch/parisc/kernel/sys_parisc32.c
> > ===================================================================
> > --- linux-2.6.orig/arch/parisc/kernel/sys_parisc32.c	2008-08-16 23:40:26.000000000 -0300
> > +++ linux-2.6/arch/parisc/kernel/sys_parisc32.c	2008-08-16 23:40:46.000000000 -0300
> > @@ -284,68 +284,6 @@ int cp_compat_stat(struct kstat *stat, s
> >  	return err;
> >  }
> >  
> > -/*** copied from mips64 ***/
> > -/*
> > - * Ooo, nasty.  We need here to frob 32-bit unsigned longs to
> > - * 64-bit unsigned longs.
> > - */
> > -
> > -static inline int
> > -get_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
> > -{
> > -	n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
> > -	if (ufdset) {
> > -		unsigned long odd;
> > -
> > -		if (!access_ok(VERIFY_WRITE, ufdset, n*sizeof(u32)))
> > -			return -EFAULT;
> > -
> > -		odd = n & 1UL;
> > -		n &= ~1UL;
> > -		while (n) {
> > -			unsigned long h, l;
> > -			__get_user(l, ufdset);
> > -			__get_user(h, ufdset+1);
> > -			ufdset += 2;
> > -			*fdset++ = h << 32 | l;
> > -			n -= 2;
> > -		}
> > -		if (odd)
> > -			__get_user(*fdset, ufdset);
> > -	} else {
> > -		/* Tricky, must clear full unsigned long in the
> > -		 * kernel fdset at the end, this makes sure that
> > -		 * actually happens.
> > -		 */
> > -		memset(fdset, 0, ((n + 1) & ~1)*sizeof(u32));
> > -	}
> > -	return 0;
> > -}
> > -
> > -static inline void
> > -set_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
> > -{
> > -	unsigned long odd;
> > -	n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
> > -
> > -	if (!ufdset)
> > -		return;
> > -
> > -	odd = n & 1UL;
> > -	n &= ~1UL;
> > -	while (n) {
> > -		unsigned long h, l;
> > -		l = *fdset++;
> > -		h = l >> 32;
> > -		__put_user(l, ufdset);
> > -		__put_user(h, ufdset+1);
> > -		ufdset += 2;
> > -		n -= 2;
> > -	}
> > -	if (odd)
> > -		__put_user(*fdset, ufdset);
> > -}
> > -
> >  struct msgbuf32 {
> >      int mtype;
> >      char mtext[1];
> ---end quoted text---
---end quoted text---

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

* Re: [RFC] remove dead code from sys_parisc32.c
  2009-06-08  7:37   ` Christoph Hellwig
@ 2009-06-08 14:17     ` John David Anglin
  2009-06-08 14:20       ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: John David Anglin @ 2009-06-08 14:17 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-parisc

> On Wed, Nov 05, 2008 at 03:08:10PM +0100, Christoph Hellwig wrote:
> > Anyone wants to pick this one up?
> > 
> > On Sun, Aug 17, 2008 at 04:41:51AM +0200, Christoph Hellwig wrote:
> > > Unless I'm totally missing something get_fd_set32/set_fd_set32 are
> > > completely unused.

In theory, they were removed in 2004 by this proposed change:
http://lkml.org/lkml/2004/4/17/37

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

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

* Re: [RFC] remove dead code from sys_parisc32.c
  2009-06-08 14:17     ` John David Anglin
@ 2009-06-08 14:20       ` Christoph Hellwig
  2009-06-15 16:37         ` Grant Grundler
  2009-06-15 22:51         ` Kyle McMartin
  0 siblings, 2 replies; 10+ messages in thread
From: Christoph Hellwig @ 2009-06-08 14:20 UTC (permalink / raw)
  To: John David Anglin; +Cc: Christoph Hellwig, linux-parisc

On Mon, Jun 08, 2009 at 10:17:51AM -0400, John David Anglin wrote:
> > On Wed, Nov 05, 2008 at 03:08:10PM +0100, Christoph Hellwig wrote:
> > > Anyone wants to pick this one up?
> > > 
> > > On Sun, Aug 17, 2008 at 04:41:51AM +0200, Christoph Hellwig wrote:
> > > > Unless I'm totally missing something get_fd_set32/set_fd_set32 are
> > > > completely unused.
> 
> In theory, they were removed in 2004 by this proposed change:
> http://lkml.org/lkml/2004/4/17/37

The users were removed, the helpers stayed.  Kyle promised to put the
patch to remove them in last year, but somehow the patch got lost a
couple of times :)


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

* Re: [RFC] remove dead code from sys_parisc32.c
  2009-06-08 14:20       ` Christoph Hellwig
@ 2009-06-15 16:37         ` Grant Grundler
  2009-06-15 22:51         ` Kyle McMartin
  1 sibling, 0 replies; 10+ messages in thread
From: Grant Grundler @ 2009-06-15 16:37 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: John David Anglin, linux-parisc

On Mon, Jun 08, 2009 at 04:20:39PM +0200, Christoph Hellwig wrote:
> On Mon, Jun 08, 2009 at 10:17:51AM -0400, John David Anglin wrote:
> > > On Wed, Nov 05, 2008 at 03:08:10PM +0100, Christoph Hellwig wrote:
> > > > Anyone wants to pick this one up?
> > > > 
> > > > On Sun, Aug 17, 2008 at 04:41:51AM +0200, Christoph Hellwig wrote:
> > > > > Unless I'm totally missing something get_fd_set32/set_fd_set32 are
> > > > > completely unused.
> > 
> > In theory, they were removed in 2004 by this proposed change:
> > http://lkml.org/lkml/2004/4/17/37
> 
> The users were removed, the helpers stayed.  Kyle promised to put the
> patch to remove them in last year, but somehow the patch got lost a
> couple of times :)

Kyle and Helge are the maintainers right now and probably just
need to push your original patch. It looks straight forward to me.

thanks
grant

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

* Re: [RFC] remove dead code from sys_parisc32.c
  2009-06-08 14:20       ` Christoph Hellwig
  2009-06-15 16:37         ` Grant Grundler
@ 2009-06-15 22:51         ` Kyle McMartin
  1 sibling, 0 replies; 10+ messages in thread
From: Kyle McMartin @ 2009-06-15 22:51 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: John David Anglin, linux-parisc

On Mon, Jun 08, 2009 at 04:20:39PM +0200, Christoph Hellwig wrote:
> On Mon, Jun 08, 2009 at 10:17:51AM -0400, John David Anglin wrote:
> > > On Wed, Nov 05, 2008 at 03:08:10PM +0100, Christoph Hellwig wrote:
> > > > Anyone wants to pick this one up?
> > > > 
> > > > On Sun, Aug 17, 2008 at 04:41:51AM +0200, Christoph Hellwig wrote:
> > > > > Unless I'm totally missing something get_fd_set32/set_fd_set32 are
> > > > > completely unused.
> > 
> > In theory, they were removed in 2004 by this proposed change:
> > http://lkml.org/lkml/2004/4/17/37
> 
> The users were removed, the helpers stayed.  Kyle promised to put the
> patch to remove them in last year, but somehow the patch got lost a
> couple of times :)
> 

Yeah yeah, I suck. :) I'll send it along tonight.

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

end of thread, other threads:[~2009-06-15 22:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-17  2:41 [RFC] remove dead code from sys_parisc32.c Christoph Hellwig
2008-08-18 20:44 ` Grant Grundler
2008-08-20  3:44 ` Kyle McMartin
2008-11-05 14:08 ` Christoph Hellwig
2008-11-05 15:10   ` Kyle McMartin
2009-06-08  7:37   ` Christoph Hellwig
2009-06-08 14:17     ` John David Anglin
2009-06-08 14:20       ` Christoph Hellwig
2009-06-15 16:37         ` Grant Grundler
2009-06-15 22:51         ` Kyle McMartin

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