From: Thierry Reding <thierry.reding@gmail.com>
To: "Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: linux-kernel@vger.kernel.org, linus.walleij@linaro.org,
bgolaszewski@baylibre.com, andrew@aj.id.au, albeu@free.fr,
f.fainelli@gmail.com, sbranden@broadcom.com,
bcm-kernel-feedback-list@broadcom.com,
Eugeniy.Paltsev@synopsys.com, hoan@os.amperecomputing.com,
fancer.lancer@gmail.com, orsonzhai@gmail.com,
baolin.wang7@gmail.com, zhang.lyra@gmail.com, vz@mleia.com,
marek.behun@nic.cz, matthias.bgg@gmail.com,
u.kleine-koenig@pengutronix.de, lee.jones@linaro.org,
shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
grygorii.strashko@ti.com, ssantosh@kernel.org,
khilman@kernel.org, manivannan.sadhasivam@linaro.org,
p.zabel@pengutronix.de, linux-gpio@vger.kernel.org,
linux-pwm@vger.kernel.org, linux-omap@vger.kernel.org,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros
Date: Tue, 17 Nov 2020 16:54:01 +0100 [thread overview]
Message-ID: <20201117155401.GC2589875@ulmo> (raw)
In-Reply-To: <20201117154340.18216-1-info@metux.net>
[-- Attachment #1: Type: text/plain, Size: 910 bytes --]
On Tue, Nov 17, 2020 at 04:43:40PM +0100, Enrico Weigelt, metux IT consult wrote:
> The of_match_ptr(foo) macro evaluates to foo, only if
> CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with
> CONFIG_ACPI. That's very helpful for drivers that can be used
> with or without oftree / acpi.
>
> Even though most of the drivers touched here probably don't
> actually need that, it's also nice for consistency to make it
> the de-facto standard and change all drivers to use the
> of_match_ptr() and ACPI_PTR() macros.
>
> A nice side effect: in some situations, when compiled w/o
> CONFIG_OF/CONFIG_ACPI, the corresponding match tables could
> automatically become unreferenced and optimized-away by the
> compiler, w/o explicitly cluttering the code w/ ifdef's.
Isn't this going to cause a lot of "defined but unused" warnings when
built without OF support, for example?
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-11-17 15:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-17 15:43 [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros Enrico Weigelt, metux IT consult
2020-11-17 15:54 ` Thierry Reding [this message]
2020-11-17 16:01 ` Lee Jones
2020-11-17 16:45 ` Andy Shevchenko
2020-11-17 16:49 ` Andy Shevchenko
2020-11-18 9:53 ` Uwe Kleine-König
2020-11-18 9:56 ` Andy Shevchenko
2020-11-18 10:01 ` Andy Shevchenko
2020-11-18 10:08 ` Lee Jones
2020-11-18 10:15 ` Andy Shevchenko
2020-11-27 12:45 ` Enrico Weigelt, metux IT consult
2020-11-17 18:27 ` kernel test robot
2020-11-17 19:30 ` kernel test robot
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=20201117155401.GC2589875@ulmo \
--to=thierry.reding@gmail.com \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=albeu@free.fr \
--cc=andrew@aj.id.au \
--cc=baolin.wang7@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bgolaszewski@baylibre.com \
--cc=f.fainelli@gmail.com \
--cc=fancer.lancer@gmail.com \
--cc=festevam@gmail.com \
--cc=grygorii.strashko@ti.com \
--cc=hoan@os.amperecomputing.com \
--cc=info@metux.net \
--cc=kernel@pengutronix.de \
--cc=khilman@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=marek.behun@nic.cz \
--cc=matthias.bgg@gmail.com \
--cc=orsonzhai@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=s.hauer@pengutronix.de \
--cc=sbranden@broadcom.com \
--cc=shawnguo@kernel.org \
--cc=ssantosh@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=vz@mleia.com \
--cc=zhang.lyra@gmail.com \
/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