lkml.org 
[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] vlynq: Fix a compilation with CONFIG_VLYNQ_DEBUG=y
Date
From: tianyaxiong <tianyaxiong@kylinos.cn>

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@kylinos.cn>
Signed-off-by: tianyaxiong <tianyaxiong@kylinos.cn>
---
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
\
 
 \ /
  Last update: 2023-03-27 00:29    [W:0.021 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site