All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Dan Murphy <dmurphy@ti.com>
Cc: Brian Masney <masneyb@onstation.org>,
	lee.jones@linaro.org, daniel.thompson@linaro.org,
	jingoohan1@gmail.com, robh+dt@kernel.org,
	jacek.anaszewski@gmail.com, mark.rutland@arm.com,
	b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	jonathan@marek.ca
Subject: Re: [PATCH v3 3/3] backlight: lm3630a: add firmware node support
Date: Wed, 01 May 2019 08:26:27 +0000	[thread overview]
Message-ID: <20190501082627.GA2971@amd> (raw)
In-Reply-To: <0e5e26ba-cf98-913e-8e76-e988a86dc0d1@ti.com>

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Hi!

> > @@ -396,13 +506,20 @@ static int lm3630a_probe(struct i2c_client *client,
> >  				     GFP_KERNEL);
> >  		if (pdata == NULL)
> >  			return -ENOMEM;
> > +
> >  		/* default values */
> > -		pdata->leda_ctrl = LM3630A_LEDA_ENABLE;
> > -		pdata->ledb_ctrl = LM3630A_LEDB_ENABLE;
> > +		pdata->leda_ctrl = LM3630A_LEDA_DISABLE;
> > +		pdata->ledb_ctrl = LM3630A_LEDB_DISABLE;
> 
> This is not needed since default is disabled and kzalloc will set these to 0

Let compiler do this kind of optimalizations. Code makes sense as-is.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@ucw.cz>
To: Dan Murphy <dmurphy@ti.com>
Cc: Brian Masney <masneyb@onstation.org>,
	lee.jones@linaro.org, daniel.thompson@linaro.org,
	jingoohan1@gmail.com, robh+dt@kernel.org,
	jacek.anaszewski@gmail.com, mark.rutland@arm.com,
	b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	jonathan@marek.ca
Subject: Re: [PATCH v3 3/3] backlight: lm3630a: add firmware node support
Date: Wed, 1 May 2019 10:26:27 +0200	[thread overview]
Message-ID: <20190501082627.GA2971@amd> (raw)
In-Reply-To: <0e5e26ba-cf98-913e-8e76-e988a86dc0d1@ti.com>

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Hi!

> > @@ -396,13 +506,20 @@ static int lm3630a_probe(struct i2c_client *client,
> >  				     GFP_KERNEL);
> >  		if (pdata == NULL)
> >  			return -ENOMEM;
> > +
> >  		/* default values */
> > -		pdata->leda_ctrl = LM3630A_LEDA_ENABLE;
> > -		pdata->ledb_ctrl = LM3630A_LEDB_ENABLE;
> > +		pdata->leda_ctrl = LM3630A_LEDA_DISABLE;
> > +		pdata->ledb_ctrl = LM3630A_LEDB_DISABLE;
> 
> This is not needed since default is disabled and kzalloc will set these to 0

Let compiler do this kind of optimalizations. Code makes sense as-is.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2019-05-01  8:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  7:29 [PATCH v3 0/3] backlight: lm3630a: bug fix and fwnode support Brian Masney
2019-04-15  7:29 ` Brian Masney
2019-04-15  7:29 ` [PATCH v3 1/3] backlight: lm3630a: return 0 on success in update_status functions Brian Masney
2019-04-15  7:29   ` Brian Masney
2019-04-15  7:29 ` [PATCH v3 2/3] dt-bindings: backlight: add lm3630a bindings Brian Masney
2019-04-15  7:29   ` Brian Masney
2019-04-15 12:10   ` Dan Murphy
2019-04-15 12:10     ` Dan Murphy
2019-04-15 12:10     ` Dan Murphy
2019-04-15 12:42     ` Brian Masney
2019-04-15 12:42       ` Brian Masney
2019-04-15  7:29 ` [PATCH v3 3/3] backlight: lm3630a: add firmware node support Brian Masney
2019-04-15  7:29   ` Brian Masney
2019-04-15 12:10   ` Dan Murphy
2019-04-15 12:10     ` Dan Murphy
2019-04-15 12:10     ` Dan Murphy
2019-05-01  8:26     ` Pavel Machek [this message]
2019-05-01  8:26       ` Pavel Machek
2019-05-01 12:18       ` Dan Murphy
2019-05-01 12:18         ` Dan Murphy
2019-05-01 12:18         ` Dan Murphy

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=20190501082627.GA2971@amd \
    --to=pavel@ucw.cz \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel.thompson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jingoohan1@gmail.com \
    --cc=jonathan@marek.ca \
    --cc=lee.jones@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=masneyb@onstation.org \
    --cc=robh+dt@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.