lkml.org 
[lkml]   [2009]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] Constify struct kset_uevent_ops for 2.6.32-git-053fe57ac v2
Pekka Enberg wrote:
> On Mon, Dec 14, 2009 at 2:00 AM, <re.emese@gmail.com> wrote:
>> From: Emese Revfy <re.emese@gmail.com>
>>
>>
>> Signed-off-by: Emese Revfy <re.emese@gmail.com>
>> ---
>> mm/slub.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/mm/slub.c b/mm/slub.c
>> index 4996fc7..fb63aca 100644
>> --- a/mm/slub.c
>> +++ b/mm/slub.c
>> @@ -4522,7 +4522,7 @@ static int uevent_filter(struct kset *kset, struct kobject *kobj)
>> return 0;
>> }
>>
>> -static struct kset_uevent_ops slab_uevent_ops = {
>> +static const struct kset_uevent_ops slab_uevent_ops = {
>> .filter = uevent_filter,
>> };
>
> CC mm/slub.o
> mm/slub.c: In function 'slab_sysfs_init':
> mm/slub.c:4679: warning: passing argument 2 of 'kset_create_and_add'
> discards qualifiers from pointer target type
> include/linux/kobject.h:164: note: expected 'struct kset_uevent_ops *'
> but argument is of type 'const struct kset_uevent_ops *'
>
> Hmm?
>

I double checked both the declaration and definitions of the affected
function/structure and they are consistently const here.
Can you tell me what patch/tree combination you encountered this warning with?
Thanks, Emese


\
 
 \ /
  Last update: 2009-12-26 01:39    [W:0.122 / U:0.448 seconds]
©2003-2014 Jasper Spaans. Advertise on this site