public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Emese Revfy <re.emese@gmail.com>
To: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
	linux-kernel@vger.kernel.org, cl@linux-foundation.org,
	torvalds@linux-foundation.org
Subject: Re: [PATCH 3/4] Constify struct kset_uevent_ops for 	2.6.32-git-053fe57ac v2
Date: Tue, 29 Dec 2009 21:50:45 +0100	[thread overview]
Message-ID: <4B3A6BA5.60103@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0912281244400.12772@chino.kir.corp.google.com>

David Rientjes wrote:
> On Sat, 26 Dec 2009, Emese Revfy wrote:
> 
>>>> 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
>>
> 
> The warning emitted by gcc is pretty explicit; the second formal of 
> kset_create_and_add() takes a 'struct kset_uevent_ops *' type while you're 
> now passing 'const struct kset_uevent_ops *' as the result of your change.  
> That said, kset_create() could probably be modified with the const 
> qualifier, but that's outside the scope of your patchset and would have to 
> be proposed seperately.

I see what you mean, this was part of [PATCH 1/4] that I forgot to CC to you.
Emese


  reply	other threads:[~2009-12-29 20:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14  0:00 [PATCH 0/4] Constify struct kset_uevent_ops for 2.6.32-git-053fe57ac v2 re.emese
2009-12-14  0:00 ` [PATCH 1/4] " re.emese
2009-12-14  0:00 ` [PATCH 2/4] " re.emese
2009-12-14 10:22   ` Steven Whitehouse
2009-12-14  0:00 ` [PATCH 1/1] Constify struct kgdb_io " re.emese
2009-12-14  0:00 ` [PATCH 3/4] Constify struct kset_uevent_ops " re.emese
2009-12-25 11:31   ` Pekka Enberg
2009-12-26  0:38     ` Emese Revfy
2009-12-28 20:46       ` David Rientjes
2009-12-29 20:50         ` Emese Revfy [this message]
2009-12-29 20:51           ` Pekka Enberg
2009-12-29  7:24       ` Pekka Enberg
2009-12-29 20:58         ` [PATCH 1/1] Constify struct kset_uevent_ops for 2.6.33-rc2 Emese Revfy
2009-12-30  0:11           ` Greg KH
2009-12-31  0:16             ` Emese Revfy
2009-12-31  4:40               ` Greg KH
2009-12-31 13:52                 ` Emese Revfy
2009-12-14  0:00 ` [PATCH 4/4] Constify struct kset_uevent_ops for 2.6.32-git-053fe57ac v2 re.emese

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=4B3A6BA5.60103@gmail.com \
    --to=re.emese@gmail.com \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=rientjes@google.com \
    --cc=torvalds@linux-foundation.org \
    /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