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] [day] [month] [year] [list]
Date:   Wed, 1 May 2019 07:18:52 -0500
From:   Dan Murphy <dmurphy@...com>
To:     Pavel Machek <pavel@....cz>
CC:     Brian Masney <masneyb@...tation.org>, <lee.jones@...aro.org>,
        <daniel.thompson@...aro.org>, <jingoohan1@...il.com>,
        <robh+dt@...nel.org>, <jacek.anaszewski@...il.com>,
        <mark.rutland@....com>, <b.zolnierkie@...sung.com>,
        <dri-devel@...ts.freedesktop.org>, <linux-leds@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-fbdev@...r.kernel.org>, <jonathan@...ek.ca>
Subject: Re: [PATCH v3 3/3] backlight: lm3630a: add firmware node support

Pavel

On 5/1/19 3:26 AM, Pavel Machek wrote:
> 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.
> 

Yes the code makes sense but it is unnecessary.

Dan

> 									Pavel
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ