From: greg@kroah.com (Greg KH)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [RFC-patch] pc87360 - unchecked
Date: Fri, 18 Aug 2006 21:21:22 +0000 [thread overview]
Message-ID: <20060818212122.GC29488@kroah.com> (raw)
In-Reply-To: <44D2514B.2090202@gmail.com>
On Thu, Aug 17, 2006 at 10:45:03PM -0400, Mark M. Hoffman wrote:
> It's a reasonable question though. I wondered about it for a little bit
> when I saw that struct attribute_group seems to be missing two const
> modifiers, i.e.:
>
> --- linux-2.6.18-rc4-mm1.orig/include/linux/sysfs.h
> +++ linux-2.6.18-rc4-mm1/include/linux/sysfs.h
> @@ -24,7 +24,7 @@ struct attribute {
>
> struct attribute_group {
> const char * name;
> - struct attribute ** attrs;
> + const struct attribute * const * attrs;
> };
>
> But actually compiling a kernel with the above introduces a ton of warnings.
It shouldn't make that many warnings, but yeah, that would be the
correct fix.
> All those I examined could be fixed by adding const to struct attribute
> declarations (AFAICT nobody is actually modifying any data through those
> pointers), but I haven't looked at them all, and it's late here, blah...
Care to send a patch for this? We are trying to fix up things like this
in the kernel to make it harder for people to do things wrong.
thanks,
greg k-h
prev parent reply other threads:[~2006-08-18 21:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-03 19:40 [lm-sensors] [RFC-patch] pc87360 - unchecked Jim Cromie
2006-08-13 19:45 ` Mark M. Hoffman
2006-08-14 13:17 ` Jean Delvare
2006-08-16 5:35 ` Jim Cromie
2006-08-16 21:04 ` Jean Delvare
2006-08-17 19:35 ` Jim Cromie
2006-08-17 20:01 ` Greg KH
2006-08-17 21:45 ` Jim Cromie
2006-08-18 2:45 ` Mark M. Hoffman
2006-08-18 4:35 ` Greg KH
2006-08-18 11:48 ` Jean Delvare
2006-08-18 21:21 ` Greg KH [this message]
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=20060818212122.GC29488@kroah.com \
--to=greg@kroah.com \
--cc=lm-sensors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.