mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Guillermo O. Freschi" <kedrot@gmail.com>
To: Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	lustre-devel@lists.lustre.org, linux-kernel@vger.kernel.org
Cc: "Guillermo O. Freschi" <kedrot@gmail.com>
Subject: [PATCH] staging/lustre: echo_client.c - fix sparse warning: cast removes address space of expression
Date: Thu,  8 Jun 2017 02:35:27 -0300	[thread overview]
Message-ID: <20170608053527.21599-1-kedrot@gmail.com> (raw)

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

             reply	other threads:[~2017-06-08  5:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08  5:35 Guillermo O. Freschi [this message]
2017-06-21  7:24 ` Tordek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170608053527.21599-1-kedrot@gmail.com \
    --to=kedrot@gmail.com \
    --cc=andreas.dilger@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®