From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Simon Guinot <simon.guinot@sequanux.org>
Cc: Andrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,
Alexandre Courbot <gnurou@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bryan Wu <cooloney@gmail.com>,
Vincent Donnefort <vdonnefort@gmail.com>,
devicetree@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>,
linux-arm-kernel@lists.infradead.org,
Gregory Clement <gregory.clement@free-electrons.com>,
Yoann Sculo <yoann@sculo.fr>,
linux-leds@vger.kernel.org,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH v4 1/3] leds: netxbig: add device tree binding
Date: Mon, 21 Sep 2015 11:10:56 +0200 [thread overview]
Message-ID: <55FFC9A0.1020608@samsung.com> (raw)
In-Reply-To: <20150918131011.GN7306@kw.sim.vm.gnt>
On 09/18/2015 03:10 PM, Simon Guinot wrote:
> On Fri, Sep 18, 2015 at 12:49:28PM +0200, Jacek Anaszewski wrote:
>>>>
>>>> Moreover, if you switched to using devm* prefixed version of
>>>> gpio_request_one and led_classdev_reqister, you could simplify
>>>> the error paths in the driver.
>>>
>>> Yes, I have a pending patch for this conversion. But since it is not
>>> really related with the subject of this patch series (add DT support),
>>> I was planning to send it next.
>>>
>>> Do you want me to include this patch into this series.
>>
>> Why not, if you have it ready to go. If it needs some polishing,
>> we can live with what we have now.
>
> No, the patch is ready. I'll add it.
>
>>>>> +static const struct of_device_id of_netxbig_leds_match[] = {
>>>>> + { .compatible = "lacie,netxbig-leds", },
>>>>> + {},
>>>>> +};
>>>>> +#else
>>>>> +static int netxbig_leds_get_of_pdata(struct device *dev,
>>>>> + struct netxbig_led_platform_data *pdata)
>>>>
>>>> s/static int/static inline int/
>>>
>>> Is that not already the case with modern compiler ?
>>
>> Could you elaborate on this?
>
> There is not much to say. netxbig_leds_get_of_pdata is a single line of
> code. I am not a gcc expert but I am quite confident that this function
> will be inlined anyway (given the optimisation level used to compile the
> Linux kernel). That's it.
>
> But there is nothing wrong by adding "inline" neither.
Right. All the more, this is a common pattern for no-ops, also in *.c
files.
--
Best Regards,
Jacek Anaszewski
WARNING: multiple messages have this Message-ID (diff)
From: j.anaszewski@samsung.com (Jacek Anaszewski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/3] leds: netxbig: add device tree binding
Date: Mon, 21 Sep 2015 11:10:56 +0200 [thread overview]
Message-ID: <55FFC9A0.1020608@samsung.com> (raw)
In-Reply-To: <20150918131011.GN7306@kw.sim.vm.gnt>
On 09/18/2015 03:10 PM, Simon Guinot wrote:
> On Fri, Sep 18, 2015 at 12:49:28PM +0200, Jacek Anaszewski wrote:
>>>>
>>>> Moreover, if you switched to using devm* prefixed version of
>>>> gpio_request_one and led_classdev_reqister, you could simplify
>>>> the error paths in the driver.
>>>
>>> Yes, I have a pending patch for this conversion. But since it is not
>>> really related with the subject of this patch series (add DT support),
>>> I was planning to send it next.
>>>
>>> Do you want me to include this patch into this series.
>>
>> Why not, if you have it ready to go. If it needs some polishing,
>> we can live with what we have now.
>
> No, the patch is ready. I'll add it.
>
>>>>> +static const struct of_device_id of_netxbig_leds_match[] = {
>>>>> + { .compatible = "lacie,netxbig-leds", },
>>>>> + {},
>>>>> +};
>>>>> +#else
>>>>> +static int netxbig_leds_get_of_pdata(struct device *dev,
>>>>> + struct netxbig_led_platform_data *pdata)
>>>>
>>>> s/static int/static inline int/
>>>
>>> Is that not already the case with modern compiler ?
>>
>> Could you elaborate on this?
>
> There is not much to say. netxbig_leds_get_of_pdata is a single line of
> code. I am not a gcc expert but I am quite confident that this function
> will be inlined anyway (given the optimisation level used to compile the
> Linux kernel). That's it.
>
> But there is nothing wrong by adding "inline" neither.
Right. All the more, this is a common pattern for no-ops, also in *.c
files.
--
Best Regards,
Jacek Anaszewski
next prev parent reply other threads:[~2015-09-21 9:11 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 15:59 [PATCH v4 0/3] Add DT support for netxbig LEDs Simon Guinot
2015-09-17 15:59 ` Simon Guinot
2015-09-17 15:59 ` [PATCH v4 1/3] leds: netxbig: add device tree binding Simon Guinot
2015-09-17 15:59 ` Simon Guinot
2015-09-18 9:16 ` Jacek Anaszewski
2015-09-18 9:16 ` Jacek Anaszewski
2015-09-18 10:30 ` Simon Guinot
2015-09-18 10:30 ` Simon Guinot
2015-09-18 10:49 ` Jacek Anaszewski
2015-09-18 10:49 ` Jacek Anaszewski
2015-09-18 13:10 ` Simon Guinot
2015-09-18 13:10 ` Simon Guinot
2015-09-21 9:10 ` Jacek Anaszewski [this message]
2015-09-21 9:10 ` Jacek Anaszewski
2015-09-21 15:38 ` Rob Herring
2015-09-21 15:38 ` Rob Herring
2015-09-22 9:30 ` Simon Guinot
2015-09-22 9:30 ` Simon Guinot
2015-09-28 7:58 ` Jacek Anaszewski
2015-09-28 7:58 ` Jacek Anaszewski
2015-10-05 8:15 ` Simon Guinot
2015-10-05 8:15 ` Simon Guinot
2015-09-17 15:59 ` [PATCH v4 2/3] ARM: Kirkwood: add LED DT entries for netxbig boards Simon Guinot
2015-09-17 15:59 ` Simon Guinot
2015-09-17 15:59 ` [PATCH v4 3/3] ARM: mvebu: remove static LED setup " Simon Guinot
2015-09-17 15:59 ` Simon Guinot
2015-09-18 9:15 ` [PATCH v4 0/3] Add DT support for netxbig LEDs Jacek Anaszewski
2015-09-18 9:15 ` Jacek Anaszewski
2015-09-18 13:23 ` Simon Guinot
2015-09-18 13:23 ` Simon Guinot
2015-09-21 9:25 ` Jacek Anaszewski
2015-09-21 9:25 ` Jacek Anaszewski
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=55FFC9A0.1020608@samsung.com \
--to=j.anaszewski@samsung.com \
--cc=andrew@lunn.ch \
--cc=cooloney@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=gregory.clement@free-electrons.com \
--cc=jason@lakedaemon.net \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=sebastian.hesselbarth@gmail.com \
--cc=simon.guinot@sequanux.org \
--cc=vdonnefort@gmail.com \
--cc=yoann@sculo.fr \
/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.