From: Pavel Machek <pavel@ucw.cz>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>
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, 25 Apr 2021 22:19:28 +0200 [thread overview]
Message-ID: <20210425201928.GA10996@amd> (raw)
In-Reply-To: <7bb757c7-55af-66a4-aa12-fe646a19fcf6@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]
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?
It is not there is gain in them unsorted; it is that keeping sorted
order is not worth the effort.
> >>>+#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.
I believe the cost (longer macro names) outweights the benefits here.
Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2021-04-25 20:19 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
2021-04-25 20:19 ` Pavel Machek [this message]
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=20210425201928.GA10996@amd \
--to=pavel@ucw.cz \
--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=jacek.anaszewski@gmail.com \
--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=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).