Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1537847

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space
Date 2016-12-07 16:40 +0100
Message-ID <sLMu6-1RI-29@gated-at.bofh.it> (permalink)
References <sJZYt-6OX-17@gated-at.bofh.it> <sLaoN-2aw-11@gated-at.bofh.it> <sLorL-2IR-13@gated-at.bofh.it> <sLMkp-1Oz-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space Quentin Lambert <lambert.quentin@gmail.com> - 2016-12-02 18:40 +0100
  Re: [PATCH] staging: lustre: Fix a spatch warning due to an  assignment from kernel to user space Dan Carpenter <dan.carpenter@oracle.com> - 2016-12-05 22:00 +0100
  Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space Oleg Drokin <oleg.drokin@intel.com> - 2016-12-06 00:00 +0100
    Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due  to an assignment from kernel to user space Quentin Lambert <lambert.quentin@gmail.com> - 2016-12-06 15:00 +0100
      Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due  to an assignment from kernel to user space Quentin Lambert <lambert.quentin@gmail.com> - 2016-12-07 16:30 +0100
        Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due  to an assignment from kernel to user space Dan Carpenter <dan.carpenter@oracle.com> - 2016-12-07 16:40 +0100
          Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due  to an assignment from kernel to user space Quentin Lambert <lambert.quentin@gmail.com> - 2016-12-07 16:50 +0100
            Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due  to an assignment from kernel to user space Dan Carpenter <dan.carpenter@oracle.com> - 2016-12-07 20:30 +0100
              Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning  due to an assignment from kernel to user space James Simmons <jsimmons@infradead.org> - 2016-12-07 21:00 +0100
          Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space Oleg Drokin <oleg.drokin@intel.com> - 2016-12-07 18:20 +0100
        Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due  to an assignment from kernel to user space Dan Carpenter <dan.carpenter@oracle.com> - 2016-12-07 16:40 +0100
        Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space Oleg Drokin <oleg.drokin@intel.com> - 2016-12-07 18:30 +0100

csiph-web