All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: "Enrico Weigelt, metux IT consult" <info@metux.net>,
	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, 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:01:12 +0000	[thread overview]
Message-ID: <20201117160112.GI1869941@dell> (raw)
In-Reply-To: <20201117155401.GC2589875@ulmo>

On Tue, 17 Nov 2020, Thierry Reding wrote:

> 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?

Yes, it will.

It also looks like there are some whitespace changes in the patch,
unless of course that's just Git playing tricks!

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2020-11-17 16:01 UTC|newest]

Thread overview: 15+ 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 [this message]
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 18:27   ` kernel test robot
2020-11-17 19:30 ` 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=20201117160112.GI1869941@dell \
    --to=lee.jones@linaro.org \
    --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=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=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 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.