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:   Sun, 12 Mar 2023 11:06:06 +0100
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Jarkko Sakkinen <jarkko@...nel.org>
Cc:     Peter Huewe <peterhuewe@....de>, Jason Gunthorpe <jgg@...pe.ca>,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] tpm: st33zp24: Mark ACPI and OF related data as maybe
 unused

On 12/03/2023 02:53, Jarkko Sakkinen wrote:
> On Sat, Mar 11, 2023 at 06:35:40PM +0100, Krzysztof Kozlowski wrote:
>> The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making
>>
>>   drivers/char/tpm/st33zp24/i2c.c:141:34: error: ‘of_st33zp24_i2c_match’ defined but not used [-Werror=unused-const-variable=]
>>   drivers/char/tpm/st33zp24/spi.c:258:34: error: ‘of_st33zp24_spi_match’ defined but not used [-Werror=unused-const-variable=]
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> 
> Please also briefly describe the change.

I lost there piece of word. Should be:

"The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making
unused."

This is self-descriptive, I think. We allow it to be unused. Solution is
trivial and so common, I am really not sure what's the benefit to repeat
the code in the commit msg 100 times... The code is really obvious, thus
the commit msg focuses on the "why".

> 
>> ---
>>  drivers/char/tpm/st33zp24/i2c.c | 4 ++--
>>  drivers/char/tpm/st33zp24/spi.c | 4 ++--
>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/char/tpm/st33zp24/i2c.c b/drivers/char/tpm/st33zp24/i2c.c
>> index c4d0b744e3cc..2d28f55ef490 100644
>> --- a/drivers/char/tpm/st33zp24/i2c.c
>> +++ b/drivers/char/tpm/st33zp24/i2c.c
>> @@ -138,13 +138,13 @@ static const struct i2c_device_id st33zp24_i2c_id[] = {
>>  };
>>  MODULE_DEVICE_TABLE(i2c, st33zp24_i2c_id);
>>  
>> -static const struct of_device_id of_st33zp24_i2c_match[] = {
>> +static const struct of_device_id of_st33zp24_i2c_match[] __maybe_unused = {
>>  	{ .compatible = "st,st33zp24-i2c", },
>>  	{}
>>  };
>>  MODULE_DEVICE_TABLE(of, of_st33zp24_i2c_match);
>>  
>> -static const struct acpi_device_id st33zp24_i2c_acpi_match[] = {
>> +static const struct acpi_device_id st33zp24_i2c_acpi_match[] __maybe_unused = {
>>  	{"SMO3324"},
>>  	{}

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ