Re: [PATCH 2/2] crypto - img-hash: Drop of_match_ptr for ID table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 17, 2023 at 09:12:05AM +0100, Krzysztof Kozlowski wrote:
>
> 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.

I know it works now, but what I'm saying is that if struct device_driver
actually had of_match_table as conditional on OF, which ideally it
should, then removing of_match_ptr will break the build.

I know that it's currently unconditionally defined, but that's
just wasting memory on non-OF machines such as x86.

So either this driver is OF-only, in which case you can drop
the of_match_ptr but must add a dependency on OF.  Or it's not
OF-only, in which case you should use of_match_ptr.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux