From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@microchip.com>,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] crypto - img-hash: Drop of_match_ptr for ID table
Date: Fri, 17 Mar 2023 09:12:05 +0100 [thread overview]
Message-ID: <b8cd828b-edc5-6748-bf97-af0fc85e14a4@linaro.org> (raw)
In-Reply-To: <ZBPYpYfd29YwN1Dy@gondor.apana.org.au>
On 17/03/2023 04:04, Herbert Xu wrote:
> On Fri, Mar 10, 2023 at 11:30:27PM +0100, Krzysztof Kozlowski wrote:
>>
>> diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c
>> index fe93d19e3044..4e9a6660d791 100644
>> --- a/drivers/crypto/img-hash.c
>> +++ b/drivers/crypto/img-hash.c
>> @@ -1106,7 +1106,7 @@ static struct platform_driver img_hash_driver = {
>> .driver = {
>> .name = "img-hash-accelerator",
>> .pm = &img_hash_pm_ops,
>> - .of_match_table = of_match_ptr(img_hash_match),
>> + .of_match_table = img_hash_match,
>
> I think we should keep this because this driver doesn't explicitly
> depend on OF. Sure of_match_table is unconditionally defined but
> I'd call that a bug instead of a feature :)
The missing dependency on OF is not a problem. The OF code is prepare
and will work fine if the driver is built with !OF. The point is that
with !OF after dropping of_match_ptr(), the driver could match via ACPI
(PRP0001). If we make it depending on OF, the driver won't be able to
use it, unless kernel is built with OF which is unlikely for ACPI systems.
>
> However, I would take this if you resend it with a Kconfig update
> to add an explicit dependency on OF.
>
> Thanks,
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-03-17 8:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 22:30 [PATCH 1/2] crypto - atmel-sha204a: Mark OF related data as maybe unused Krzysztof Kozlowski
2023-03-10 22:30 ` [PATCH 2/2] crypto - img-hash: Drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-17 3:04 ` Herbert Xu
2023-03-17 8:12 ` Krzysztof Kozlowski [this message]
2023-03-17 8:30 ` Herbert Xu
2023-03-17 9:01 ` Krzysztof Kozlowski
2023-03-17 9:15 ` Herbert Xu
2023-03-17 9:22 ` Krzysztof Kozlowski
2023-03-23 8:43 ` Ard Biesheuvel
2023-03-24 10:03 ` Herbert Xu
2023-03-17 3:28 ` [PATCH 1/2] crypto - atmel-sha204a: Mark OF related data as maybe unused Herbert Xu
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=b8cd828b-edc5-6748-bf97-af0fc85e14a4@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@microchip.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.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