[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230608211200.1247213-2-kuba@kernel.org>
Date: Thu, 8 Jun 2023 14:11:49 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org,
edumazet@...gle.com,
pabeni@...hat.com,
Jakub Kicinski <kuba@...nel.org>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH net-next 01/12] tools: ynl-gen: cleanup user space header includes
Bots started screaming that we're including stdlib.h twice.
While at it move string.h into a common spot and drop stdio.h
which we don't need.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5464
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5466
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5467
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
---
tools/net/ynl/ynl-gen-c.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py
index 251c5bfffd8d..e1b86b1fba66 100755
--- a/tools/net/ynl/ynl-gen-c.py
+++ b/tools/net/ynl/ynl-gen-c.py
@@ -2323,8 +2323,8 @@ _C_KW = {
headers = ['uapi/' + parsed.uapi_header]
else:
cw.p('#include <stdlib.h>')
+ cw.p('#include <string.h>')
if args.header:
- cw.p('#include <string.h>')
cw.p('#include <linux/types.h>')
else:
cw.p(f'#include "{parsed.name}-user.h"')
@@ -2339,9 +2339,6 @@ _C_KW = {
if args.mode == "user":
if not args.header:
- cw.p("#include <stdlib.h>")
- cw.p("#include <stdio.h>")
- cw.p("#include <string.h>")
cw.p("#include <libmnl/libmnl.h>")
cw.p("#include <linux/genetlink.h>")
cw.nl()
--
2.40.1
Powered by blists - more mailing lists