staging: lustre/lnet: Fix wrong typecasting warning generated by sparse
authorNiranjan Dighe <niranjan.dighe@gmail.com>
Sun, 14 Feb 2016 03:21:48 +0000 (08:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Feb 2016 00:21:15 +0000 (16:21 -0800)
commitd60fc1bbc26a16e79258d9b11baea83f49ff7776
treed2d95154dc6c1dce7e65c378bd32bfb86295acea
parent5fd88337d209d5948ab86b6dfca968dbb29ef89a
staging: lustre/lnet: Fix wrong typecasting warning generated by sparse

Fix the following warning generated about type casting by sparse

warning: cast removes address space of expression

The current implementation casts the structure pointers with (char *)
without __user annotation and then adds sizeof struct to it, thereby
generating the sparse warning. Fixed this by removing the unnecessary
char pointer type cast.

Signed-off-by: Niranjan Dighe <niranjan.dighe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/selftest/console.c