diff mbox series

leds: tlc591xx: Mark OF related data as maybe unused

Message ID 20230311111717.252019-1-krzysztof.kozlowski@linaro.org
State New
Headers show
Series leds: tlc591xx: Mark OF related data as maybe unused | expand

Commit Message

Krzysztof Kozlowski March 11, 2023, 11:17 a.m. UTC
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  drivers/leds/leds-tlc591xx.c:138:34: error: ‘of_tlc591xx_leds_match’ defined but not used [-Werror=unused-const-variable=]

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

Comments

Pavel Machek March 11, 2023, 11:35 a.m. UTC | #1
On Sat 2023-03-11 12:17:17, Krzysztof Kozlowski wrote:
> The driver can be compile tested with !CONFIG_OF making certain data
> unused:
> 
>   drivers/leds/leds-tlc591xx.c:138:34: error: ‘of_tlc591xx_leds_match’ defined but not used [-Werror=unused-const-variable=]
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Acked-by: Pavel Machek <pavel@ucw.cz>
Krzysztof Kozlowski March 12, 2023, 10:21 a.m. UTC | #2
On 11/03/2023 12:35, Pavel Machek wrote:
> On Sat 2023-03-11 12:17:17, Krzysztof Kozlowski wrote:
>> The driver can be compile tested with !CONFIG_OF making certain data
>> unused:
>>
>>   drivers/leds/leds-tlc591xx.c:138:34: error: ‘of_tlc591xx_leds_match’ defined but not used [-Werror=unused-const-variable=]
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Acked-by: Pavel Machek <pavel@ucw.cz>

I was thinking you will take it... or the Ack is for Lee then?

Best regards,
Krzysztof
Pavel Machek March 12, 2023, 7:23 p.m. UTC | #3
On Sun 2023-03-12 11:21:44, Krzysztof Kozlowski wrote:
> On 11/03/2023 12:35, Pavel Machek wrote:
> > On Sat 2023-03-11 12:17:17, Krzysztof Kozlowski wrote:
> >> The driver can be compile tested with !CONFIG_OF making certain data
> >> unused:
> >>
> >>   drivers/leds/leds-tlc591xx.c:138:34: error: ‘of_tlc591xx_leds_match’ defined but not used [-Werror=unused-const-variable=]
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > 
> > Acked-by: Pavel Machek <pavel@ucw.cz>
> 
> I was thinking you will take it... or the Ack is for Lee then?

Me or Lee will take it, depending on workload.

Best regards,
								Pavel
Lee Jones March 13, 2023, 5:10 p.m. UTC | #4
On Sat, 11 Mar 2023, Krzysztof Kozlowski wrote:

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

Applied, thanks

--
Lee Jones [李琼斯]
diff mbox series

Patch

diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c
index ec25e0c16bea..7e31db50036f 100644
--- a/drivers/leds/leds-tlc591xx.c
+++ b/drivers/leds/leds-tlc591xx.c
@@ -135,7 +135,7 @@  static const struct regmap_config tlc591xx_regmap = {
 	.max_register = 0x1e,
 };
 
-static const struct of_device_id of_tlc591xx_leds_match[] = {
+static const struct of_device_id of_tlc591xx_leds_match[] __maybe_unused = {
 	{ .compatible = "ti,tlc59116",
 	  .data = &tlc59116 },
 	{ .compatible = "ti,tlc59108",