lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0912281244400.12772@chino.kir.corp.google.com>
Date:	Mon, 28 Dec 2009 12:46:55 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Emese Revfy <re.emese@...il.com>
cc:	Pekka Enberg <penberg@...helsinki.fi>,
	linux-kernel@...r.kernel.org, cl@...ux-foundation.org,
	torvalds@...ux-foundation.org
Subject: Re: [PATCH 3/4] Constify struct kset_uevent_ops for 	2.6.32-git-053fe57ac
 v2

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ