linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yejune Deng <yejune.deng@gmail.com>
To: nickhu@andestech.com, green.hu@gmail.com, deanbo422@gmail.com,
	yejune.deng@gmail.com, rdunlap@infradead.org,
	akpm@linux-foundation.org, lkp@intel.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] lib: dynamic_queue_limits: Fix when built in ARCH nds32
Date: Sat, 16 Jan 2021 09:01:39 +0800	[thread overview]
Message-ID: <20210116010139.71748-1-yejune.deng@gmail.com> (raw)

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


                 reply	other threads:[~2021-01-16  1:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210116010139.71748-1-yejune.deng@gmail.com \
    --to=yejune.deng@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=deanbo422@gmail.com \
    --cc=green.hu@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nickhu@andestech.com \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).