staging/lustre: echo_client.c - fix sparse warning: cast removes address space of expression
PATCH 1/1 staging/lustre: echo_client.c - fix sparse warning: cast removes address space of expression
The function only cares about the value of the pointer, not the contents of the pointed-to data. Adding a __force annotation to the cast removes this warning.
Signed-off-by Guillermo O. Freschi <[email protected]>
--- drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdecho/echo_client.c +1 -1
@@ -1428,7 +1428,7 @@ static int echo_client_brw_ioctl(const struct lu_env *env, int rw, oa->o_valid &= ~OBD_MD_FLHANDLE ;/* OFD/obdfilter works only via prep/commit */ - test_mode = (long )data->ioc_pbuf1; + test_mode = (__force long )data->ioc_pbuf1;if (test_mode ==1 ) async =0 ;
Signature · 1 line
2.11.0
Hi, List
I don't want to be a bother but should I be doing something different when submitting patches? I know it's minor but it's a simple change and it's received no response after two weeks; not even a rejection.
Cheers
--
Tordek
Quoted 25 lines · Guillermo O. Freschi
The function only cares about the value of the pointer, not the contents of the pointed-to data. Adding a
__forceannotation to the cast removes this warning.Signed-off-by Guillermo O. Freschi <[email protected]>--- drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/lustre/lustre/obdecho/echo_client.c +1
-2@@ -1428,7 +1428,7 @@ static int echo_client_brw_ioctl(const struct lu_env *env, int rw, oa->o_valid &= ~OBD_MD_FLHANDLE ;/* OFD/obdfilter works only via prep/commit */ - test_mode = (long )data->ioc_pbuf1; + test_mode = (__force long )data->ioc_pbuf1;if (test_mode ==1 ) async =0 ; --2.11.0