From: Jakub Kicinski Date: Thu, 8 Jun 2023 21:11:49 +0000 (-0700) Subject: tools: ynl-gen: cleanup user space header includes X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=30b5c720e1a90c9709187871c9f2152192078519;p=linux.git 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 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 --- diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py index 251c5bfffd8da..e1b86b1fba66f 100755 --- a/tools/net/ynl/ynl-gen-c.py +++ b/tools/net/ynl/ynl-gen-c.py @@ -2323,8 +2323,8 @@ def main(): headers = ['uapi/' + parsed.uapi_header] else: cw.p('#include ') + cw.p('#include ') if args.header: - cw.p('#include ') cw.p('#include ') else: cw.p(f'#include "{parsed.name}-user.h"') @@ -2339,9 +2339,6 @@ def main(): if args.mode == "user": if not args.header: - cw.p("#include ") - cw.p("#include ") - cw.p("#include ") cw.p("#include ") cw.p("#include ") cw.nl()