94a0911d73cc760cd636eca76696b275fa1a2ceb
[openwrt/openwrt.git] /
1 From a4fb434ef96ace5af758ca2c52c3a3f8f3abc87c Mon Sep 17 00:00:00 2001
2 From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
3 Date: Tue, 4 Apr 2023 18:21:34 +0100
4 Subject: [PATCH] nvmem: stm32-romem: mark OF related data as maybe unused
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 The driver can be compile tested with !CONFIG_OF making certain data
10 unused:
11
12 drivers/nvmem/stm32-romem.c:271:34: error: ‘stm32_romem_of_match’ defined but not used [-Werror=unused-const-variable=]
13
14 Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
15 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
16 Link: https://lore.kernel.org/r/20230404172148.82422-27-srinivas.kandagatla@linaro.org
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 ---
19 drivers/nvmem/stm32-romem.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 --- a/drivers/nvmem/stm32-romem.c
23 +++ b/drivers/nvmem/stm32-romem.c
24 @@ -268,7 +268,7 @@ static const struct stm32_romem_cfg stm3
25 .ta = true,
26 };
27
28 -static const struct of_device_id stm32_romem_of_match[] = {
29 +static const struct of_device_id stm32_romem_of_match[] __maybe_unused = {
30 { .compatible = "st,stm32f4-otp", }, {
31 .compatible = "st,stm32mp15-bsec",
32 .data = (void *)&stm32mp15_bsec_cfg,