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


Groups > linux.kernel > #1301628 > unrolled thread

RE: [lustre-devel] [PATCH] staging: lustre/lustre/libcfs: Fix type mismatch reported by sparse

Started by"Simmons, James A." <simmonsja@ornl.gov>
First post2016-01-05 16:50 +0100
Last post2016-01-05 16:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [lustre-devel] [PATCH] staging: lustre/lustre/libcfs: Fix type  mismatch reported by sparse "Simmons, James A." <simmonsja@ornl.gov> - 2016-01-05 16:50 +0100

#1301628 — RE: [lustre-devel] [PATCH] staging: lustre/lustre/libcfs: Fix type mismatch reported by sparse

From"Simmons, James A." <simmonsja@ornl.gov>
Date2016-01-05 16:50 +0100
SubjectRE: [lustre-devel] [PATCH] staging: lustre/lustre/libcfs: Fix type mismatch reported by sparse
Message-ID<qNC1Y-4OF-17@gated-at.bofh.it>
>> On Wed, Dec 09, 2015 at 10:38:13PM +0530, Niranjan Dighe wrote:
>>> The third argument to function kportal_memhog_alloc is expected to
>>> be gfp_t whereas the actual argument was unsigned int. Fix this by
>>> explicitly typecasting to gfp_t
>>>
>>> Signed-off-by: Niranjan Dighe <niranjan.dighe@gmail.com>
>>> ---
>>>  drivers/staging/lustre/lustre/libcfs/module.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
>>> index 96d9d46..9c79f6e 100644
>>> --- a/drivers/staging/lustre/lustre/libcfs/module.c
>>> +++ b/drivers/staging/lustre/lustre/libcfs/module.c
>>> @@ -268,7 +268,7 @@ static int libcfs_ioctl_int(struct cfs_psdev_file *pfile, unsigned long cmd,
>>>                       /* XXX The ioc_flags is not GFP flags now, need to be fixed */
>>>                       err = kportal_memhog_alloc(pfile->private_data,
>>>                                                  data->ioc_count,
>>> -                                                data->ioc_flags);
>>> +                                     (__force gfp_t)data->ioc_flags);
>>
>> No, please fix the type to be correct properly, like the comment says
>> needs to be done.
>>
>> thanks,
>>
>> greg k-h
>
>Hello Greg,
>
>I could see that the ioc_flags member of the struct libcfs_ioctl_data
>is used as gfp_t only in the
>case of the ioctl IOC_LIBCFS_MEMHOG. I can think of following ways to
>correct it -

IOC_LIBCFS_MEMHOG will be going away. Since this keeps coming up I will prepare some patches.
Especially now that out tools no longer uses these obsolete ioctls.
--
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/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web