[PATCH] vlynq: Fix a compilation with CONFIG_VLYNQ_DEBUG=y
From: tianyaxiong
Date: Tue Feb 21 2023 - 02:20:58 EST
From: tianyaxiong <tianyaxiong@xxxxxxxxxx>
The vlynq_dump_regs() and vlynq_dump_mem() are unused ,so when
CONFIG_VLYNQ_DEBUG=y,a compilation issue occurred.
drivers/vlynq/vlynq.c:82:13: error: ‘vlynq_dump_mem’ defined but not used [-Werror=unused-function]
drivers/vlynq/vlynq.c:68:13: error: ‘vlynq_dump_regs’ defined but not used [-Werror=unused-function]
we can add __always_unused to fix it.
Reported-by: k2ci <kernel-bot@xxxxxxxxxx>
Signed-off-by: tianyaxiong <tianyaxiong@xxxxxxxxxx>
---
drivers/vlynq/vlynq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/vlynq/vlynq.c b/drivers/vlynq/vlynq.c
index 4af6615808cc..6b6d6ad8ee1f 100644
--- a/drivers/vlynq/vlynq.c
+++ b/drivers/vlynq/vlynq.c
@@ -65,7 +65,7 @@ struct vlynq_regs {
};
#ifdef CONFIG_VLYNQ_DEBUG
-static void vlynq_dump_regs(struct vlynq_device *dev)
+static void __always_unused vlynq_dump_regs(struct vlynq_device *dev)
{
int i;
@@ -79,7 +79,7 @@ static void vlynq_dump_regs(struct vlynq_device *dev)
}
}
-static void vlynq_dump_mem(u32 *base, int count)
+static void __always_unused vlynq_dump_mem(u32 *base, int count)
{
int i;
--
2.25.1