mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging/lustre: echo_client.c - fix sparse warning: cast removes address space of expression
@ 2017-06-08  5:35 Guillermo O. Freschi
  2017-06-21  7:24 ` Tordek
  0 siblings, 1 reply; 2+ messages in thread
From: Guillermo O. Freschi @ 2017-06-08  5:35 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, lustre-devel, linux-kernel
  Cc: Guillermo O. Freschi

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 <kedrot@gmail.com>
---
 drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index d4768311cf92..1757714c56a0 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging/lustre: echo_client.c - fix sparse warning: cast removes address space of expression
  2017-06-08  5:35 [PATCH] staging/lustre: echo_client.c - fix sparse warning: cast removes address space of expression Guillermo O. Freschi
@ 2017-06-21  7:24 ` Tordek
  0 siblings, 0 replies; 2+ messages in thread
From: Tordek @ 2017-06-21  7:24 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Lustre Development List,
	Linux Kernel Mailing List

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

On 8 June 2017 at 02:35, Guillermo O. Freschi <kedrot@gmail.com> wrote:
> 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 <kedrot@gmail.com>
> ---
>  drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c
> index d4768311cf92..1757714c56a0 100644
> --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
> +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
> @@ -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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-21  7:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-08  5:35 [PATCH] staging/lustre: echo_client.c - fix sparse warning: cast removes address space of expression Guillermo O. Freschi
2017-06-21  7:24 ` Tordek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®