linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Nishka Dasgupta <nishkadg.linux@gmail.com>
Cc: jingoohan1@gmail.com, linux-fbdev@vger.kernel.org,
	lee.jones@linaro.org, dri-devel@lists.freedesktop.org,
	b.zolnierkie@samsung.com
Subject: Re: [PATCH] backlight: ipaq_micro: Make structure micro_bl_props constant
Date: Tue, 03 Sep 2019 16:19:23 +0000	[thread overview]
Message-ID: <20190903161923.5d2fvrwpvgims4va@holly.lan> (raw)
In-Reply-To: <20190813091251.2nyxtivsvp47aahp@holly.lan>

On Tue, Aug 13, 2019 at 10:12:51AM +0100, Daniel Thompson wrote:
> On Tue, Aug 13, 2019 at 02:28:55PM +0530, Nishka Dasgupta wrote:
> > Static structure micro_bl_props, having type backlight_properties, is
> > used only once, when it is passed as the last argument to function
> > devm_backlight_device_register(). devm_backlight_device_register() is
> > defined with its last parameter being declared constant. Hence make
> > micro_bl_props itself constant as well.
> > Issue found with Coccinelle.
> 
> Did you do any review to see if this pattern occurs in other backlight
> drivers (it looks to me like the same pattern appears in
> rave-sp-backlight.c... do the tools bring that one out as well).

Ping?


Daniel.


> > Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
> > ---
> >  drivers/video/backlight/ipaq_micro_bl.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/video/backlight/ipaq_micro_bl.c b/drivers/video/backlight/ipaq_micro_bl.c
> > index 1123f67c12b3..85b16cc82878 100644
> > --- a/drivers/video/backlight/ipaq_micro_bl.c
> > +++ b/drivers/video/backlight/ipaq_micro_bl.c
> > @@ -44,7 +44,7 @@ static const struct backlight_ops micro_bl_ops = {
> >  	.update_status  = micro_bl_update_status,
> >  };
> >  
> > -static struct backlight_properties micro_bl_props = {
> > +static const struct backlight_properties micro_bl_props = {
> >  	.type = BACKLIGHT_RAW,
> >  	.max_brightness = 255,
> >  	.power = FB_BLANK_UNBLANK,
> > -- 
> > 2.19.1
> > 

  reply	other threads:[~2019-09-03 16:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13  8:59 [PATCH] backlight: ipaq_micro: Make structure micro_bl_props constant Nishka Dasgupta
2019-08-13  9:12 ` Daniel Thompson
2019-09-03 16:19   ` Daniel Thompson [this message]
2019-09-04  3:53     ` Nishka Dasgupta
2019-09-12 10:15 ` Daniel Thompson

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=20190903161923.5d2fvrwpvgims4va@holly.lan \
    --to=daniel.thompson@linaro.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=nishkadg.linux@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).