[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210116010139.71748-1-yejune.deng@gmail.com>
Date: Sat, 16 Jan 2021 09:01:39 +0800
From: Yejune Deng <yejune.deng@...il.com>
To: nickhu@...estech.com, green.hu@...il.com, deanbo422@...il.com,
yejune.deng@...il.com, rdunlap@...radead.org,
akpm@...ux-foundation.org, lkp@...el.com
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] lib: dynamic_queue_limits: Fix when built in ARCH nds32
In arch nds32, build fail with following errors:
lib/dynamic_queue_limits.c: In function 'dql_reset':
lib/dynamic_queue_limits.c:119:2: error: implicit declaration of
function 'memset' [-Werror=implicit-function-declaration]
memset(dql, 0, offsetof(struct dql, lowest_slack));
Add <linux/string.h> fixes that.
Fixes: 36ef65b21930 ("lib: dynamic_queue_limits: use memset and offsetof ")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Yejune Deng <yejune.deng@...il.com>
---
lib/dynamic_queue_limits.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index 21f07452a6f7..334ac16a1bfc 100644
--- a/lib/dynamic_queue_limits.c
+++ b/lib/dynamic_queue_limits.c
@@ -10,6 +10,7 @@
#include <linux/dynamic_queue_limits.h>
#include <linux/compiler.h>
#include <linux/export.h>
+#include <linux/string.h>
#define POSDIFF(A, B) ((int)((A) - (B)) > 0 ? (A) - (B) : 0)
#define AFTER_EQ(A, B) ((int)((A) - (B)) >= 0)
--
2.29.0
Powered by blists - more mailing lists