linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mfd: atmel-smc: Mark OF related data as maybe unused
@ 2023-03-11 11:16 Krzysztof Kozlowski
  2023-03-11 11:16 ` [PATCH 2/2] mfd: atc260x-i2c: drop of_match_ptr for ID table Krzysztof Kozlowski
  2023-03-16 15:58 ` [PATCH 1/2] mfd: atmel-smc: Mark OF related data as maybe unused Lee Jones
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 11:16 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Cristian Ciocaltea, Lee Jones,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, linux-actions,
	linux-kernel, linux-arm-kernel
  Cc: 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 <krzysztof.kozlowski@linaro.org>
---
 drivers/mfd/atmel-smc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/atmel-smc.c b/drivers/mfd/atmel-smc.c
index f3bad2b52f17..e560066e5885 100644
--- a/drivers/mfd/atmel-smc.c
+++ b/drivers/mfd/atmel-smc.c
@@ -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 },
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] mfd: atc260x-i2c: drop of_match_ptr for ID table
  2023-03-11 11:16 [PATCH 1/2] mfd: atmel-smc: Mark OF related data as maybe unused Krzysztof Kozlowski
@ 2023-03-11 11:16 ` Krzysztof Kozlowski
  2023-03-16 15:59   ` Lee Jones
  2023-03-16 15:58 ` [PATCH 1/2] mfd: atmel-smc: Mark OF related data as maybe unused Lee Jones
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 11:16 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Cristian Ciocaltea, Lee Jones,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, linux-actions,
	linux-kernel, linux-arm-kernel
  Cc: Krzysztof Kozlowski

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=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/mfd/atc260x-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/atc260x-i2c.c b/drivers/mfd/atc260x-i2c.c
index 19e248ed7966..8e1491167160 100644
--- a/drivers/mfd/atc260x-i2c.c
+++ b/drivers/mfd/atc260x-i2c.c
@@ -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,
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] mfd: atmel-smc: Mark OF related data as maybe unused
  2023-03-11 11:16 [PATCH 1/2] mfd: atmel-smc: Mark OF related data as maybe unused Krzysztof Kozlowski
  2023-03-11 11:16 ` [PATCH 2/2] mfd: atc260x-i2c: drop of_match_ptr for ID table Krzysztof Kozlowski
@ 2023-03-16 15:58 ` Lee Jones
  1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2023-03-16 15:58 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Manivannan Sadhasivam, Cristian Ciocaltea, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, linux-actions, linux-kernel,
	linux-arm-kernel

On Sat, 11 Mar 2023, Krzysztof Kozlowski wrote:

> 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 <krzysztof.kozlowski@linaro.org>
> ---
>  drivers/mfd/atmel-smc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

--
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] mfd: atc260x-i2c: drop of_match_ptr for ID table
  2023-03-11 11:16 ` [PATCH 2/2] mfd: atc260x-i2c: drop of_match_ptr for ID table Krzysztof Kozlowski
@ 2023-03-16 15:59   ` Lee Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2023-03-16 15:59 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Manivannan Sadhasivam, Cristian Ciocaltea, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, linux-actions, linux-kernel,
	linux-arm-kernel

On Sat, 11 Mar 2023, Krzysztof Kozlowski wrote:

> 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=]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  drivers/mfd/atc260x-i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

--
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-16 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-11 11:16 [PATCH 1/2] mfd: atmel-smc: Mark OF related data as maybe unused Krzysztof Kozlowski
2023-03-11 11:16 ` [PATCH 2/2] mfd: atc260x-i2c: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-16 15:59   ` Lee Jones
2023-03-16 15:58 ` [PATCH 1/2] mfd: atmel-smc: Mark OF related data as maybe unused Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).