[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZwZ7_qjDH_y0JIcN@nanopsycho.orion>
Date: Wed, 9 Oct 2024 14:50:06 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Antonio Quartulli <a@...table.cc>
Cc: kuba@...nel.org, netdev@...r.kernel.org, donald.hunter@...il.com,
pabeni@...hat.com, davem@...emloft.net, edumazet@...gle.com
Subject: Re: [PATCH] tools: ynl-gen: include auto-generated uAPI header only
once
Wed, Oct 09, 2024 at 02:12:35PM CEST, a@...table.cc wrote:
>The auto-generated uAPI file is currently included in both the
>.h and .c netlink stub files.
>However, the .c file already includes its .h counterpart, thus
>leading to a double inclusion of the uAPI header.
>
>Prevent the double inclusion by including the uAPI header in the
>.h stub file only.
>
>Signed-off-by: Antonio Quartulli <a@...table.cc>
>---
> drivers/dpll/dpll_nl.c | 2 --
> drivers/net/team/team_nl.c | 2 --
> fs/nfsd/netlink.c | 2 --
> net/core/netdev-genl-gen.c | 1 -
> net/devlink/netlink_gen.c | 2 --
> net/handshake/genl.c | 2 --
> net/ipv4/fou_nl.c | 2 --
> net/mptcp/mptcp_pm_gen.c | 2 --
> tools/net/ynl/ynl-gen-c.py | 4 +++-
> 9 files changed, 3 insertions(+), 16 deletions(-)
>
>diff --git a/drivers/dpll/dpll_nl.c b/drivers/dpll/dpll_nl.c
>index fe9b6893d261..9a739d9dcfbd 100644
>--- a/drivers/dpll/dpll_nl.c
>+++ b/drivers/dpll/dpll_nl.c
>@@ -8,8 +8,6 @@
>
> #include "dpll_nl.h"
>
>-#include <uapi/linux/dpll.h>
What seems to be the problem? The uapi headers are protected for double
inclusion, no?
#ifndef _UAPI_LINUX_DPLL_H
#define _UAPI_LINUX_DPLL_H
Powered by blists - more mailing lists