From: Christoph Hellwig <hch@lst.de>
To: linux-parisc@vger.kernel.org
Subject: [RFC] remove dead code from sys_parisc32.c
Date: Sun, 17 Aug 2008 04:41:51 +0200 [thread overview]
Message-ID: <20080817024151.GA24129@lst.de> (raw)
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);
-}
next reply other threads:[~2008-08-17 2:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-17 2:41 Christoph Hellwig [this message]
2008-08-18 20:44 ` [RFC] remove dead code from sys_parisc32.c 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080817024151.GA24129@lst.de \
--to=hch@lst.de \
--cc=linux-parisc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox