mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: matthew@wil.cx
Cc: torvalds@transmeta.com, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH][COMPAT] move struct flock32 8/8 parisc
Date: Fri, 3 Jan 2003 17:42:12 +1100	[thread overview]
Message-ID: <20030103174212.18df3e6b.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20030103164106.21e65093.sfr@canb.auug.org.au>

Hi Willy,

Here is the parisc part of the patch. This is against Linus' recent 2.5.54
BK tree plus the previous patch I sent you.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.5.54-200301031304-32bit.1/arch/parisc/kernel/sys_parisc32.c 2.5.54-200301031304-32bit.2/arch/parisc/kernel/sys_parisc32.c
--- 2.5.54-200301031304-32bit.1/arch/parisc/kernel/sys_parisc32.c	2003-01-03 16:24:15.000000000 +1100
+++ 2.5.54-200301031304-32bit.2/arch/parisc/kernel/sys_parisc32.c	2003-01-03 16:24:56.000000000 +1100
@@ -387,39 +387,6 @@
  * code available in case it's useful to others. -PB
  */
 
-struct flock32 {
-	short l_type;
-	short l_whence;
-	compat_off_t l_start;
-	compat_off_t l_len;
-	compat_pid_t l_pid;
-};
-
-
-static inline int get_flock(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-	
-	err = get_user(kfl->l_type, &ufl->l_type);
-	err |= __get_user(kfl->l_whence, &ufl->l_whence);
-	err |= __get_user(kfl->l_start, &ufl->l_start);
-	err |= __get_user(kfl->l_len, &ufl->l_len);
-	err |= __get_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
-static inline int put_flock(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-	
-	err = __put_user(kfl->l_type, &ufl->l_type);
-	err |= __put_user(kfl->l_whence, &ufl->l_whence);
-	err |= __put_user(kfl->l_start, &ufl->l_start);
-	err |= __put_user(kfl->l_len, &ufl->l_len);
-	err |= __put_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
 extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
 
 asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
@@ -432,7 +399,7 @@
 			struct flock f;
 			long ret;
 			
-			if(get_flock(&f, (struct flock32 *)arg))
+			if(get_compat_flock(&f, (struct compat_flock *)arg))
 				return -EFAULT;
 			KERNEL_SYSCALL(ret, sys_fcntl, fd, cmd, (unsigned long)&f);
 			if (ret) return ret;
@@ -440,7 +407,7 @@
 			    f.l_len >= 0x7fffffffUL ||
 			    f.l_start + f.l_len >= 0x7fffffffUL)
 				return -EOVERFLOW;
-			if(put_flock(&f, (struct flock32 *)arg))
+			if(put_compat_flock(&f, (struct compat_flock *)arg))
 				return -EFAULT;
 			return 0;
 		}
diff -ruN 2.5.54-200301031304-32bit.1/include/asm-parisc/compat.h 2.5.54-200301031304-32bit.2/include/asm-parisc/compat.h
--- 2.5.54-200301031304-32bit.1/include/asm-parisc/compat.h	2003-01-03 16:24:15.000000000 +1100
+++ 2.5.54-200301031304-32bit.2/include/asm-parisc/compat.h	2003-01-03 16:24:56.000000000 +1100
@@ -64,4 +64,12 @@
 	u32		st_spare4[3];
 };
 
+struct compat_flock {
+	short		l_type;
+	short		l_whence;
+	compat_off_t	l_start;
+	compat_off_t	l_len;
+	compat_pid_t	l_pid;
+};
+
 #endif /* _ASM_PARISC_COMPAT_H */

      parent reply	other threads:[~2003-01-03  6:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-03  5:41 [PATCH][COMPAT] move struct flock32 1/8 generic Stephen Rothwell
2003-01-03  5:55 ` [PATCH][COMPAT] move struct flock32 2/8 ppc64 Stephen Rothwell
2003-01-03  6:21 ` [PATCH][COMPAT] move struct flock32 3/8 sparc64 Stephen Rothwell
2003-01-04  2:56   ` David S. Miller
2003-01-04  6:18     ` Stephen Rothwell
2003-01-06  7:00       ` David S. Miller
2003-01-03  6:25 ` [PATCH][COMPAT] move struct flock32 4/8 x86_64 Stephen Rothwell
2003-01-03  6:28 ` [PATCH][COMPAT] move struct flock32 5/8 ia64 Stephen Rothwell
2003-01-03  6:35 ` [PATCH][COMPAT] move struct flock32 6/8 s390x Stephen Rothwell
2003-01-03  6:39 ` [PATCH][COMPAT] move struct flock32 7/8 mips64 Stephen Rothwell
2003-01-03  6:42 ` Stephen Rothwell [this message]

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=20030103174212.18df3e6b.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=torvalds@transmeta.com \
    /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

all inboxes | Powered by JetHome®