mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zahari Doychev <zahari.doychev@linux.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	oleg.drokin@intel.com, bergwolf@gmail.com,
	andreas.dilger@intel.com, gregkh@linuxfoundation.org
Subject: Re: [PATCH 1/2] [drivers] staging/lustre: fix sparse warnings
Date: Tue, 25 Nov 2014 08:35:42 +0100	[thread overview]
Message-ID: <20141125073542.GN429@riot.fritz.box> (raw)
In-Reply-To: <20141124234036.GA4835@mwanda>

On Tue, Nov 25, 2014 at 02:40:36AM +0300, Dan Carpenter wrote:
> On Mon, Nov 24, 2014 at 07:55:41PM +0100, Zahari Doychev wrote:
> > --- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
> > +++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
> > @@ -784,7 +784,8 @@ lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset,
> >  		   unsigned int nsiov, struct iovec *siov, unsigned int soffset,
> >  		   unsigned int nob)
> >  {
> > -	struct iovec diov = {/*.iov_base = */ dest, /*.iov_len = */ dlen};
> > +	struct iovec diov = {/*.iov_base = */ (void __user *)dest,
> > +			     /*.iov_len = */ dlen};
> >  
> 
> Why can't we just make the comments into code by removing the /*
> characters?  Remove the cast by declaring the data as __user data to
> begin with instead of declaring it incorrectly and then casting to the
> correct type later.

If I make the declarations right then I am moving the casts to other functions.
I was not sure which one is better but it is not a problem I will fix this.

> 
> Also it's not allowed to send two patches with the exact same subject.
> Also the subject was sucky and too vague anyway.  :)

Sorry for that.

regards,
Zahari

> 
> regards,
> dan carpenter
> 
> --
> 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/

  parent reply	other threads:[~2014-11-25  7:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24 18:55 [PATCH 0/2] fix some sparse warnings in lustre Zahari Doychev
2014-11-24 18:55 ` [PATCH 1/2] [drivers] staging/lustre: fix sparse warnings Zahari Doychev
2014-11-24 23:40   ` Dan Carpenter
2014-11-25  0:48     ` Dilger, Andreas
2014-11-25  7:35     ` Zahari Doychev [this message]
2014-11-25  7:52       ` Dan Carpenter
2014-11-24 18:55 ` [PATCH 2/2] " Zahari Doychev
2014-11-26 20:53 ` [PATCH 0/2] fix some sparse warnings in lustre Greg KH

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=20141125073542.GN429@riot.fritz.box \
    --to=zahari.doychev@linux.com \
    --cc=andreas.dilger@intel.com \
    --cc=bergwolf@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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®