linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Nícolas F. R. A. Prado" <nfraprado@protonmail.com>,
	"Dan Murphy" <dmurphy@ti.com>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	"Andy Gross" <agross@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	"Brian Masney" <masneyb@onstation.org>,
	"Luca Weiss" <luca@z3ntu.xyz>,
	"Russell King" <linux@armlinux.org.uk>,
	"Georgi Djakov" <georgi.djakov@linaro.org>,
	linux-kernel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	lkcamp@lists.libreplanetbr.org, andrealmeid@collabora.com
Subject: Re: [PATCH v2 2/4] leds: Add driver for QCOM SPMI Flash LEDs
Date: Sun, 21 Feb 2021 12:28:16 +0100	[thread overview]
Message-ID: <7bb757c7-55af-66a4-aa12-fe646a19fcf6@gmail.com> (raw)
In-Reply-To: <20210219110227.GG19207@duo.ucw.cz>

On 2/19/21 12:02 PM, Pavel Machek wrote:
> Hi!
> 
>>> + */
>>> +
>>> +#include <linux/kernel.h>
>>> +#include <linux/module.h>
>>> +#include <linux/spmi.h>
>>> +#include <linux/of_device.h>
>>> +#include <linux/device.h>
>>> +#include <linux/types.h>
>>> +#include <linux/string.h>
>>> +#include <linux/mutex.h>
>>> +#include <linux/sysfs.h>
>>> +#include <linux/led-class-flash.h>
>>> +#include <linux/regulator/consumer.h>
>>> +#include <linux/delay.h>
>>> +#include <linux/regmap.h>
>>> +#include <dt-bindings/leds/leds-qcom-spmi-flash.h>
>>
>> Please sort includes alphabetically.
> 
> No need to do that.

Keeping the includes sorted eliminates the risk of introducing 
duplicates and allows for faster lookup.

What gain is in having them unsorted?

>>> +#define FLASH_SAFETY_TIMER		0x40
>>
>> Namespacing prefix is needed for macros, e.g. QCOM_FLASH*.
> 
> No need for that in .c files.

In general it eliminates the risk of name clash with other subsystems
headers.

And actually the prefix here should be QCOM_LED_FLASH to avoid ambiguity
with flash memory. If you dropped the vendor prefix then you'd get
possible name clash with led-class-flash.h namespace prefix.

-- 
Best regards,
Jacek Anaszewski

  reply	other threads:[~2021-02-21 11:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 14:03 [PATCH v2 0/4] Add support for QCOM SPMI Flash LEDs Nícolas F. R. A. Prado
2021-01-26 14:04 ` [PATCH v2 1/4] dt-bindings: leds: Add binding for qcom-spmi-flash Nícolas F. R. A. Prado
2021-01-27 14:00   ` Rob Herring
2021-01-27 14:28   ` Bjorn Andersson
2021-01-30 20:32   ` Jacek Anaszewski
2021-01-26 14:05 ` [PATCH v2 2/4] leds: Add driver for QCOM SPMI Flash LEDs Nícolas F. R. A. Prado
2021-01-27  4:23   ` Bjorn Andersson
2021-01-30 20:37   ` Jacek Anaszewski
2021-02-19 11:02     ` Pavel Machek
2021-02-21 11:28       ` Jacek Anaszewski [this message]
2021-04-25 20:19         ` Pavel Machek
2021-02-19 11:01   ` Pavel Machek
2021-01-26 14:06 ` [PATCH v2 3/4] ARM: qcom_defconfig: Enable " Nícolas F. R. A. Prado
2021-01-27 14:29   ` Bjorn Andersson
2021-01-26 14:06 ` [PATCH v2 4/4] ARM: dts: qcom: pm8941: Add nodes for " Nícolas F. R. A. Prado
2021-01-27 14:32   ` Bjorn Andersson
2021-01-30 20:31 ` [PATCH v2 0/4] Add support " Jacek Anaszewski
2021-02-19 11:04 ` Pavel Machek

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=7bb757c7-55af-66a4-aa12-fe646a19fcf6@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=agross@kernel.org \
    --cc=andrealmeid@collabora.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lkcamp@lists.libreplanetbr.org \
    --cc=luca@z3ntu.xyz \
    --cc=masneyb@onstation.org \
    --cc=nfraprado@protonmail.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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).