lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 17 Nov 2020 16:54:01 +0100
From:   Thierry Reding <thierry.reding@...il.com>
To:     "Enrico Weigelt, metux IT consult" <info@...ux.net>
Cc:     linux-kernel@...r.kernel.org, linus.walleij@...aro.org,
        bgolaszewski@...libre.com, andrew@...id.au, albeu@...e.fr,
        f.fainelli@...il.com, sbranden@...adcom.com,
        bcm-kernel-feedback-list@...adcom.com,
        Eugeniy.Paltsev@...opsys.com, hoan@...amperecomputing.com,
        fancer.lancer@...il.com, orsonzhai@...il.com,
        baolin.wang7@...il.com, zhang.lyra@...il.com, vz@...ia.com,
        marek.behun@....cz, matthias.bgg@...il.com,
        u.kleine-koenig@...gutronix.de, lee.jones@...aro.org,
        shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
        festevam@...il.com, linux-imx@....com, grygorii.strashko@...com,
        ssantosh@...nel.org, khilman@...nel.org,
        manivannan.sadhasivam@...aro.org, p.zabel@...gutronix.de,
        linux-gpio@...r.kernel.org, linux-pwm@...r.kernel.org,
        linux-omap@...r.kernel.org, linux-tegra@...r.kernel.org
Subject: Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

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

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ