[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230311111610.251774-1-krzysztof.kozlowski@linaro.org>
Date: Sat, 11 Mar 2023 12:16:09 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
Eric Tremblay <etremblay@...tech-controls.com>,
linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: [PATCH 1/2] hwmon: gpio-fan: mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data
unused:
drivers/hwmon/gpio-fan.c:484:34: error: ‘of_gpio_fan_match’ defined but not used [-Werror=unused-const-variable=]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
---
drivers/hwmon/gpio-fan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index e75db6f64e8c..be7f06fb7f78 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -481,7 +481,7 @@ static int gpio_fan_get_of_data(struct gpio_fan_data *fan_data)
return 0;
}
-static const struct of_device_id of_gpio_fan_match[] = {
+static const struct of_device_id of_gpio_fan_match[] __maybe_unused = {
{ .compatible = "gpio-fan", },
{},
};
--
2.34.1
Powered by blists - more mailing lists