* [PATCH] x86: uaccess: return value of __{get|put}_user() can be int
@ 2008-12-09 3:18 Hiroshi Shimamoto
2008-12-12 11:00 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Hiroshi Shimamoto @ 2008-12-09 3:18 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel
From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Impact: cleanup
The type of return value of __{get|put}_user() can be int.
There is no user to refer the return value of __{get|put}_user() as long.
This reduces code size a bit on 64-bit.
$ size vmlinux.*
text data bss dec hex filename
4509265 479988 673588 5662841 566879 vmlinux.new
4511462 479988 673588 5665038 56710e vmlinux.old
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
---
arch/x86/include/asm/uaccess.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index 99192bb..4340055 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -352,14 +352,14 @@ do { \
#define __put_user_nocheck(x, ptr, size) \
({ \
- long __pu_err; \
+ int __pu_err; \
__put_user_size((x), (ptr), (size), __pu_err, -EFAULT); \
__pu_err; \
})
#define __get_user_nocheck(x, ptr, size) \
({ \
- long __gu_err; \
+ int __gu_err; \
unsigned long __gu_val; \
__get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
(x) = (__force __typeof__(*(ptr)))__gu_val; \
--
1.6.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] x86: uaccess: return value of __{get|put}_user() can be int
2008-12-09 3:18 [PATCH] x86: uaccess: return value of __{get|put}_user() can be int Hiroshi Shimamoto
@ 2008-12-12 11:00 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-12-12 11:00 UTC (permalink / raw)
To: Hiroshi Shimamoto; +Cc: Thomas Gleixner, H. Peter Anvin, linux-kernel
* Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> wrote:
> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>
> Impact: cleanup
>
> The type of return value of __{get|put}_user() can be int.
> There is no user to refer the return value of __{get|put}_user() as long.
> This reduces code size a bit on 64-bit.
>
> $ size vmlinux.*
> text data bss dec hex filename
> 4509265 479988 673588 5662841 566879 vmlinux.new
> 4511462 479988 673588 5665038 56710e vmlinux.old
>
> Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> ---
> arch/x86/include/asm/uaccess.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
applied to tip/x86/mm, thanks!
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-12 11:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-09 3:18 [PATCH] x86: uaccess: return value of __{get|put}_user() can be int Hiroshi Shimamoto
2008-12-12 11:00 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox