linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] backlight: lp855x: mark OF related data as maybe unused
@ 2023-03-11 17:35 Krzysztof Kozlowski
  2023-03-11 17:35 ` [PATCH 2/2] backlight: arcxcnn_bl: drop of_match_ptr for ID table Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:35 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller, dri-devel,
	linux-fbdev, linux-kernel
  Cc: Krzysztof Kozlowski

The driver can be compile tested with !CONFIG_OF making certain data
unused:

  drivers/video/backlight/lp855x_bl.c:551:34: error: ‘lp855x_dt_ids’ defined but not used [-Werror=unused-const-variable=]

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

diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c
index 81012bf29baf..a57c9ef3b1cc 100644
--- a/drivers/video/backlight/lp855x_bl.c
+++ b/drivers/video/backlight/lp855x_bl.c
@@ -548,7 +548,7 @@ static void lp855x_remove(struct i2c_client *cl)
 	sysfs_remove_group(&lp->dev->kobj, &lp855x_attr_group);
 }
 
-static const struct of_device_id lp855x_dt_ids[] = {
+static const struct of_device_id lp855x_dt_ids[] __maybe_unused = {
 	{ .compatible = "ti,lp8550", },
 	{ .compatible = "ti,lp8551", },
 	{ .compatible = "ti,lp8552", },
-- 
2.34.1


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

* [PATCH 2/2] backlight: arcxcnn_bl: drop of_match_ptr for ID table
  2023-03-11 17:35 [PATCH 1/2] backlight: lp855x: mark OF related data as maybe unused Krzysztof Kozlowski
@ 2023-03-11 17:35 ` Krzysztof Kozlowski
  2023-03-13 10:14   ` Daniel Thompson
  2023-03-16 16:12   ` Lee Jones
  2023-03-13  9:48 ` [PATCH 1/2] backlight: lp855x: mark OF related data as maybe unused Daniel Thompson
  2023-03-16 16:11 ` Lee Jones
  2 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:35 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller, dri-devel,
	linux-fbdev, linux-kernel
  Cc: Krzysztof Kozlowski

The driver will match mostly by DT table (even thought there is regular
ID table) so there is little benefit in of_match_ptr (this also allows
ACPI matching via PRP0001, even though it might not be relevant here).

  drivers/video/backlight/arcxcnn_bl.c:378:34: error: ‘arcxcnn_dt_ids’ defined but not used [-Werror=unused-const-variable=]

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

diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c
index e610d7a1d13d..088bcca547dd 100644
--- a/drivers/video/backlight/arcxcnn_bl.c
+++ b/drivers/video/backlight/arcxcnn_bl.c
@@ -390,7 +390,7 @@ MODULE_DEVICE_TABLE(i2c, arcxcnn_ids);
 static struct i2c_driver arcxcnn_driver = {
 	.driver = {
 		.name = "arcxcnn_bl",
-		.of_match_table = of_match_ptr(arcxcnn_dt_ids),
+		.of_match_table = arcxcnn_dt_ids,
 	},
 	.probe_new = arcxcnn_probe,
 	.remove = arcxcnn_remove,
-- 
2.34.1


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

* Re: [PATCH 1/2] backlight: lp855x: mark OF related data as maybe unused
  2023-03-11 17:35 [PATCH 1/2] backlight: lp855x: mark OF related data as maybe unused Krzysztof Kozlowski
  2023-03-11 17:35 ` [PATCH 2/2] backlight: arcxcnn_bl: drop of_match_ptr for ID table Krzysztof Kozlowski
@ 2023-03-13  9:48 ` Daniel Thompson
  2023-03-16 16:11 ` Lee Jones
  2 siblings, 0 replies; 6+ messages in thread
From: Daniel Thompson @ 2023-03-13  9:48 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lee Jones, Jingoo Han, Helge Deller, dri-devel, linux-fbdev,
	linux-kernel

On Sat, Mar 11, 2023 at 06:35:55PM +0100, Krzysztof Kozlowski wrote:
> The driver can be compile tested with !CONFIG_OF making certain data
> unused:
>
>   drivers/video/backlight/lp855x_bl.c:551:34: error: ‘lp855x_dt_ids’ defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>

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

* Re: [PATCH 2/2] backlight: arcxcnn_bl: drop of_match_ptr for ID table
  2023-03-11 17:35 ` [PATCH 2/2] backlight: arcxcnn_bl: drop of_match_ptr for ID table Krzysztof Kozlowski
@ 2023-03-13 10:14   ` Daniel Thompson
  2023-03-16 16:12   ` Lee Jones
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Thompson @ 2023-03-13 10:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lee Jones, Jingoo Han, Helge Deller, dri-devel, linux-fbdev,
	linux-kernel

On Sat, Mar 11, 2023 at 06:35:56PM +0100, Krzysztof Kozlowski wrote:
> The driver will match mostly by DT table (even thought there is regular
> ID table) so there is little benefit in of_match_ptr (this also allows
> ACPI matching via PRP0001, even though it might not be relevant here).
>
>   drivers/video/backlight/arcxcnn_bl.c:378:34: error: ‘arcxcnn_dt_ids’ defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>

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

* Re: [PATCH 1/2] backlight: lp855x: mark OF related data as maybe unused
  2023-03-11 17:35 [PATCH 1/2] backlight: lp855x: mark OF related data as maybe unused Krzysztof Kozlowski
  2023-03-11 17:35 ` [PATCH 2/2] backlight: arcxcnn_bl: drop of_match_ptr for ID table Krzysztof Kozlowski
  2023-03-13  9:48 ` [PATCH 1/2] backlight: lp855x: mark OF related data as maybe unused Daniel Thompson
@ 2023-03-16 16:11 ` Lee Jones
  2 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2023-03-16 16:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Daniel Thompson, Jingoo Han, Helge Deller, dri-devel,
	linux-fbdev, linux-kernel

On Sat, 11 Mar 2023, Krzysztof Kozlowski wrote:

> The driver can be compile tested with !CONFIG_OF making certain data
> unused:
>
>   drivers/video/backlight/lp855x_bl.c:551:34: error: ‘lp855x_dt_ids’ defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  drivers/video/backlight/lp855x_bl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

--
Lee Jones [李琼斯]

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

* Re: [PATCH 2/2] backlight: arcxcnn_bl: drop of_match_ptr for ID table
  2023-03-11 17:35 ` [PATCH 2/2] backlight: arcxcnn_bl: drop of_match_ptr for ID table Krzysztof Kozlowski
  2023-03-13 10:14   ` Daniel Thompson
@ 2023-03-16 16:12   ` Lee Jones
  1 sibling, 0 replies; 6+ messages in thread
From: Lee Jones @ 2023-03-16 16:12 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Daniel Thompson, Jingoo Han, Helge Deller, dri-devel,
	linux-fbdev, linux-kernel

On Sat, 11 Mar 2023, Krzysztof Kozlowski wrote:

> The driver will match mostly by DT table (even thought there is regular
> ID table) so there is little benefit in of_match_ptr (this also allows
> ACPI matching via PRP0001, even though it might not be relevant here).
>
>   drivers/video/backlight/arcxcnn_bl.c:378:34: error: ‘arcxcnn_dt_ids’ defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  drivers/video/backlight/arcxcnn_bl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

--
Lee Jones [李琼斯]

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-11 17:35 [PATCH 1/2] backlight: lp855x: mark OF related data as maybe unused Krzysztof Kozlowski
2023-03-11 17:35 ` [PATCH 2/2] backlight: arcxcnn_bl: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-13 10:14   ` Daniel Thompson
2023-03-16 16:12   ` Lee Jones
2023-03-13  9:48 ` [PATCH 1/2] backlight: lp855x: mark OF related data as maybe unused Daniel Thompson
2023-03-16 16:11 ` 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).