Re: [PATCH v2] arch: tile: kernel: signal.c: Use __copy_from/to_user() instead of __get/put_user()

From: Chris Metcalf
Date: Tue Nov 04 2014 - 10:42:55 EST


On 11/1/2014 10:13 PM, Chen Gang wrote:
setup/restore_sigcontext() want to copy all related registers between
user and kernel. So use block copy instead of each registers copy. Then
can let code simple and clearer (which can avoid compiler's warning):

[...]

Signed-off-by: Chen Gang <gang.chen.5i5j@xxxxxxxxx>
---
arch/tile/kernel/signal.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c
index 7c2fecc..f867783 100644
--- a/arch/tile/kernel/signal.c
+++ b/arch/tile/kernel/signal.c
@@ -46,7 +46,6 @@ int restore_sigcontext(struct pt_regs *regs,
struct sigcontext __user *sc)
{
int err = 0;
- int i;

Taken into the tile tree, but I removed the now-redundant initialization
of err (shown above).

Thanks!

--
Chris Metcalf, Tilera Corp.
http://www.tilera.com

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