All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: WANG Chao <wangchao19890207@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Masaru Nomura <massa.nomura@gmail.com>,
	Peng Tao <bergwolf@gmail.com>, Chi Pham <fempsci@gmail.com>,
	Fredrick John Berchmans <fredrickprashanth@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"open list:STAGING SUBSYSTEM" <devel@driverdev.osuosl.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH resend] staging, lustre: fix a sparse error
Date: Thu, 9 Oct 2014 17:58:31 +0530	[thread overview]
Message-ID: <20141009122831.GA3300@sudip-PC> (raw)
In-Reply-To: <1412850311-5727-1-git-send-email-wangchao19890207@gmail.com>

On Thu, Oct 09, 2014 at 06:25:10PM +0800, WANG Chao wrote:
> This fixes the following sparse error:
> 
> drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib-linux.c:393:9: error:
> incompatible types in comparison expression (different address spaces)
> 
> Signed-off-by: WANG Chao <wangchao19890207@gmail.com>
> ---
>  drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib-linux.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib-linux.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib-linux.c
> index 245c9d7..1510594 100644
> --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib-linux.c
> +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib-linux.c
> @@ -390,7 +390,7 @@ ksocknal_lib_csum_tx(ksock_tx_t *tx)
>  	__u32	csum;
>  	void	*base;
>  
> -	LASSERT(tx->tx_iov[0].iov_base == (void *)&tx->tx_msg);
> +	LASSERT((void __force *) tx->tx_iov[0].iov_base == (void *)&tx->tx_msg);
is it ok? are you not just suppressing the sparse error?
iov_base is void __user *  

thanks
sudip

>  	LASSERT(tx->tx_conn != NULL);
>  	LASSERT(tx->tx_conn->ksnc_proto == &ksocknal_protocol_v2x);
>  
> -- 
> 1.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2014-10-09 12:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-09 10:25 [PATCH resend] staging, lustre: fix a sparse error WANG Chao
2014-10-09 12:28 ` Sudip Mukherjee [this message]
2014-10-10  3:21   ` WANG Chao
2014-10-12 19:17     ` Al Viro
2014-10-13  5:58       ` WANG Chao

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=20141009122831.GA3300@sudip-PC \
    --to=sudipm.mukherjee@gmail.com \
    --cc=bergwolf@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=fempsci@gmail.com \
    --cc=fredrickprashanth@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=massa.nomura@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wangchao19890207@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.