OSDN Git Service

nds32: Fix get_user/put_user macro expand pointer problem
authorZong Li <zong@andestech.com>
Mon, 13 Aug 2018 06:48:49 +0000 (14:48 +0800)
committerGreentime Hu <greentime@andestech.com>
Tue, 4 Sep 2018 06:45:16 +0000 (14:45 +0800)
commit6cce95a6c7d288ac2126eee4b95df448b9015b84
tree0c21be7d20b1f6d1e1368ab43df39a68797c98f0
parentc17df7960534357fb74074c2f514c831d4a9cf5a
nds32: Fix get_user/put_user macro expand pointer problem

The pointer argument of macro need to be taken out once first, and then
use the new pointer in the macro body.

In kernel/trace/trace.c, get_user(ch, ubuf++) causes the unexpected
increment after expand the macro.

Signed-off-by: Zong Li <zong@andestech.com>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
arch/nds32/include/asm/uaccess.h