From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
linux-leds@vger.kernel.org
Subject: Re: [PATCH v2 2/2] leds: Switch to use fwnode instead of be stuck with OF one
Date: Sat, 24 Aug 2019 16:08:08 +0200 [thread overview]
Message-ID: <022e2ffc-3085-0a42-94c3-eb3291294771@gmail.com> (raw)
In-Reply-To: <20190823203634.GX30120@smile.fi.intel.com>
On 8/23/19 10:36 PM, Andy Shevchenko wrote:
> On Fri, Aug 23, 2019 at 08:14:49PM +0200, Jacek Anaszewski wrote:
>> On 8/22/19 5:19 PM, Andy Shevchenko wrote:
>
>>> - if (!np)
>>> - return NULL;
>>
>> Why aren't you checking fwnode for being not NULL?
>> It is not guaranteed to be always initialized.
>
> And this is handled by the below. Even in the original code the check was
> redundant. Note, led_parse_fwnode_props() is written with the same redundancy.
Indeed. Patch set applied, thanks.
>>> - count = of_property_count_u32_elems(np, "led-pattern");
>>> + count = fwnode_property_count_u32(fwnode, "led-pattern");
>>> if (count < 0)
>>> return NULL;
>
--
Best regards,
Jacek Anaszewski
prev parent reply other threads:[~2019-08-24 14:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 15:19 [PATCH v2 1/2] leds: max77650: Switch to fwnode property API Andy Shevchenko
2019-08-22 15:19 ` [PATCH v2 2/2] leds: Switch to use fwnode instead of be stuck with OF one Andy Shevchenko
2019-08-23 18:14 ` Jacek Anaszewski
2019-08-23 20:36 ` Andy Shevchenko
2019-08-24 14:08 ` Jacek Anaszewski [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=022e2ffc-3085-0a42-94c3-eb3291294771@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dmurphy@ti.com \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
/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