From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Enrico Weigelt, metux IT consult" <info@metux.net>,
"Jonathan Cameron" <jic23@kernel.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
linux-tegra@vger.kernel.org,
"Thierry Reding" <thierry.reding@gmail.com>,
"Alban Bedel" <albeu@free.fr>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Lee Jones" <lee.jones@linaro.org>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Kevin Hilman" <khilman@kernel.org>,
zhang.lyra@gmail.com, "Marek Behún" <marek.behun@nic.cz>,
"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>,
dl-linux-imx <linux-imx@nxp.com>,
orsonzhai@gmail.com,
"Eugeniy Paltsev" <Eugeniy.Paltsev@synopsys.com>,
linux-pwm@vger.kernel.org,
"Grygorii Strashko" <grygorii.strashko@ti.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Vladimir Zapolskiy" <vz@mleia.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"Fabio Estevam" <festevam@gmail.com>,
"Santosh Shilimkar" <ssantosh@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Linux OMAP Mailing List" <linux-omap@vger.kernel.org>,
"Hoan Tran" <hoan@os.amperecomputing.com>,
"Scott Branden" <sbranden@broadcom.com>,
"Andrew Jeffery" <andrew@aj.id.au>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Serge Semin" <fancer.lancer@gmail.com>,
"Sascha Hauer" <kernel@pengutronix.de>,
baolin.wang7@gmail.com, "Shawn Guo" <shawnguo@kernel.org>
Subject: Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros
Date: Wed, 18 Nov 2020 10:53:42 +0100 [thread overview]
Message-ID: <20201118095342.sviuxvfsbmmn22mo@pengutronix.de> (raw)
In-Reply-To: <CAHp75VfPio=TacTTrY=vZp8vZ7qst_7zWeXKDpYvJ6q7oh2Hdw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]
On Tue, Nov 17, 2020 at 06:45:37PM +0200, Andy Shevchenko wrote:
> On Tue, Nov 17, 2020 at 5:45 PM Enrico Weigelt, metux IT consult
> <info@metux.net> 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.
>
> NAK.
>
> It prevents using DT-enabled drivers on ACPI based platforms.
So a system without CONFIG_OF might still make use of .of_match_table?
If so: TIL ...
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-11-18 9: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
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 [this message]
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=20201118095342.sviuxvfsbmmn22mo@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=albeu@free.fr \
--cc=andrew@aj.id.au \
--cc=andy.shevchenko@gmail.com \
--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=jic23@kernel.org \
--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=thierry.reding@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).