From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751676AbdFHFfl (ORCPT ); Thu, 8 Jun 2017 01:35:41 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:35875 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751655AbdFHFfi (ORCPT ); Thu, 8 Jun 2017 01:35:38 -0400 From: "Guillermo O. Freschi" To: Oleg Drokin , Andreas Dilger , lustre-devel@lists.lustre.org, linux-kernel@vger.kernel.org Cc: "Guillermo O. Freschi" 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 Message-Id: <20170608053527.21599-1-kedrot@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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