Re: [PATCH v2] crypto - img-hash: Depend on OF and silence compile test warning

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

 



On 24/03/2023 11:16, Herbert Xu wrote:
> On Sun, Mar 19, 2023 at 03:44:39PM +0100, Krzysztof Kozlowski wrote:
>> The driver is specific to OF platforms (can match only via OF table),
>> thus add dependency on CONFIG_OF.  Mark the of_device_id table as
>> unused.  This also fixes W=1 warning:
>>
>>   drivers/crypto/img-hash.c:930:34: error: ‘img_hash_match’ defined but not used [-Werror=unused-const-variable=]
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> 
> You should either add a dependency on OF or __maybe_unused.
> Adding both makes no sense.

Of course it makes, otherwise you have warnings which is also fixed here.

> 
> Anyway, what is your final goal here? If it is to get rid of
> of_match_ptr because of_match_table has been unconditinoal for
> over 10 years then just do it in one giant patch rather than
> evaluating every single driver with of_match_table as to whether
> they can be used through ACPI or not.

My current goal is to pass compile tests. The final goal is not yet
decided because final approach is not known. Different people disagree
on details, e.g. whether ACPI && !OF should have of_device_id or not.


Best regards,
Krzysztof




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