public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Quentin Lambert <lambert.quentin@gmail.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>,
	devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andreas Dilger <andreas.dilger@intel.com>,
	lustre-devel@lists.lustre.org
Subject: Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space
Date: Wed, 7 Dec 2016 18:32:14 +0300	[thread overview]
Message-ID: <20161207153214.GN8176@mwanda> (raw)
In-Reply-To: <33d23121-e5ca-0e14-bfbb-632f883e0948@gmail.com>

On Wed, Dec 07, 2016 at 04:20:06PM +0100, Quentin Lambert wrote:
> Hi all,
> 
> I am looking at the drivers/staging/lustre/lustre/llite/dir.c:
> 
> 1469                 /* Call mdc_iocontrol */
> 1470                 rc = obd_iocontrol(LL_IOC_FID2MDTIDX, exp,
> sizeof(fid), &fid,
> 1471                                    &index);
> 1472                 if (rc)
> 
> and sparse says:
> 
> drivers/staging/lustre/lustre/llite/dir.c:1471:37: warning:
> incorrect type in argument 5 (different address spaces)
> 
> I was wondering if there was any value to add a cast to fix the warning?
> And I guess this solution would also apply in my original patch to
> 
> drivers/staging/lustre/lnet/lnet/lib-socket.c

Just leave these alone until someone can come clean it up properly.

Warnings are good!  People have spent years and years to create
programs to print warnings.  Don't silence the warning by adding a cast.
The warning means show that the code is dangerous.

regards,
dan carpenter

  reply	other threads:[~2016-12-07 15:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02 17:33 [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space Quentin Lambert
2016-12-05 20:52 ` Dan Carpenter
2016-12-05 22:58 ` [lustre-devel] " Oleg Drokin
2016-12-06 13:48   ` Quentin Lambert
2016-12-07 15:20     ` Quentin Lambert
2016-12-07 15:32       ` Dan Carpenter [this message]
2016-12-07 15:33       ` Dan Carpenter
2016-12-07 15:42         ` Quentin Lambert
2016-12-07 19:22           ` Dan Carpenter
2016-12-07 19:52             ` James Simmons
2016-12-07 17:10         ` Oleg Drokin
2016-12-07 17:22       ` Oleg Drokin

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=20161207153214.GN8176@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lambert.quentin@gmail.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