lib: dynamic_queue_limits: Fix when built in ARCH nds32
PATCH 1/1 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 <[email protected]>
Signed-off-by Yejune Deng <[email protected]>
--- lib/dynamic_queue_limits.c | 1 + 1 file changed, 1 insertion(+)
lib/dynamic_queue_limits.c +1 -0
@@ -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)
Signature · 1 line
2.29.0