[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080728095309.GA31809@polina.dev.rtsoft.ru>
Date: Mon, 28 Jul 2008 13:53:09 +0400
From: Anton Vorontsov <avorontsov@...mvista.com>
To: Trent Piepho <tpiepho@...escale.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Grant Likely <grant.likely@...retlab.ca>,
linux-kernel@...r.kernel.org, Richard Purdie <rpurdie@...ys.net>,
Kumar Gala <galak@...nel.crashing.org>, linuxppc-dev@...abs.org
Subject: Re: [PATCH 1/2] leds: make the default trigger name const
On Sun, Jul 27, 2008 at 06:56:49PM -0700, Trent Piepho wrote:
> On Sun, 27 Jul 2008, Stephen Rothwell wrote:
> > On Sat, 26 Jul 2008 20:08:57 -0600 Grant Likely <grant.likely@...retlab.ca> wrote:
> >> On Fri, Jul 25, 2008 at 02:01:44PM -0700, Trent Piepho wrote:
> >>> The default_trigger fields of struct gpio_led and thus struct led_classdev
> >>> are pretty much always assigned from a string literal, which means the
> >>> string can't be modified. Which is fine, since there is no reason to
> >>> modify the string and in fact it never is.
> >>>
> >>> But they should be marked const to prevent such code from being added, to
> >>> prevent warnings if -Wwrite-strings is used and when assigned from a
> >>> constant string other than a string literal (which produces a warning under
> >>> current kernel compiler flags), and for general good coding practices.
> >>>
> >>> Signed-off-by: Trent Piepho <tpiepho@...escale.com>
> >> Acked-by: Grant Likely <grant.likely@...retlab.ca>
> >
> > I would ack this as well, except I am not sure what tree this patch is
> > against. In the current powerpc next tree,
>
> It was against powerpc next from Jul 22nd, current at the time I made the
> patch. It looks like that file has changed in the last few days. There is a
> patch from Anton Vorontsov, "leds: mark led_classdev.default_trigger as
> const", which adds const to one of the structs I modified, but doesn't get the
> other one (struct gpio_led).
Yes, I posted the patch for my version of OF GPIO LEDs, which didn't use
struct gpio_led's default_trigger.
--
Anton Vorontsov
email: cbouatmailru@...il.com
irc://irc.freenode.net/bd2
--
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