linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib: dynamic_queue_limits: Fix when built in ARCH nds32
@ 2021-01-16  1:01 Yejune Deng
  0 siblings, 0 replies; only message in thread
From: Yejune Deng @ 2021-01-16  1:01 UTC (permalink / raw)
  To: nickhu, green.hu, deanbo422, yejune.deng, rdunlap, akpm, lkp; +Cc: linux-kernel

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@intel.com>
Signed-off-by: Yejune Deng <yejune.deng@gmail.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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-16  1:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-16  1:01 [PATCH] lib: dynamic_queue_limits: Fix when built in ARCH nds32 Yejune Deng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).