mfd: atmel-smc: Mark OF related data as maybe unused
PATCH 1/2 mfd: atmel-smc: Mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/mfd/atmel-smc.c:326:34: error: ‘atmel_smc_ids’ defined but not used [-Werror=unused-const-variable=]
--- drivers/mfd/atmel-smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/atmel-smc.c +1 -1
@@ -323,7 +323,7 @@ static const struct atmel_hsmc_reg_layout sama5d2_reg_layout = { .timing_regs_offset = 0x700, }; -static const struct of_device_id atmel_smc_ids[] = { +static const struct of_device_id atmel_smc_ids[]__maybe_unused = { { .compatible ="atmel,at91sam9260-smc" , .data =NULL }, { .compatible ="atmel,sama5d3-smc" , .data = &sama5d3_reg_layout }, { .compatible ="atmel,sama5d2-smc" , .data = &sama5d2_reg_layout },
Signature · 1 line
2.34.1
PATCH 2/2 mfd: atc260x-i2c: drop of_match_ptr for ID table
The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/mfd/atc260x-i2c.c:44:34: error: ‘atc260x_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/mfd/atc260x-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/atc260x-i2c.c +1 -1
@@ -51,7 +51,7 @@ MODULE_DEVICE_TABLE(of, atc260x_i2c_of_match);static struct i2c_driver atc260x_i2c_driver = { .driver = { .name ="atc260x" , - .of_match_table =of_match_ptr (atc260x_i2c_of_match), + .of_match_table = atc260x_i2c_of_match, }, .probe_new = atc260x_i2c_probe, };
Signature · 1 line
2.34.1
Re: [PATCH 2/2] mfd: atc260x-i2c: drop of_match_ptr for ID table
Quoted 10 lines · Krzysztof Kozlowski
The driver can match only via the DT table so the table should be always used and the
of_match_ptrdoes not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/mfd/atc260x-i2c.c:44:34: error: ‘atc260x_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/mfd/atc260x-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
--
Lee Jones [李琼斯]
Quoted 9 lines · Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/mfd/atmel-smc.c:326:34: error: ‘atmel_smc_ids’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/mfd/atmel-smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
--
Lee Jones [李琼斯]