All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Luiz Duarte <gustavold@gmail.com>
To: Breno Leitao <leitao@debian.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Gustavo Luiz Duarte <gustavold@gmail.com>
Subject: [PATCH net-next v2 6/6] netconsole: move struct inet_addr into netconsole.c
Date: Mon, 10 Aug 2026 17:47:30 +0100	[thread overview]
Message-ID: <20260810-netcons_ipv6-v2-6-3d4fc987a90f@gmail.com> (raw)
In-Reply-To: <20260810-netcons_ipv6-v2-0-3d4fc987a90f@gmail.com>

The struct inet_addr lives in netpoll.h, but since commit a1116396476f
("netconsole: move local_ip/remote_ip/ipv6 to netconsole_target") the
only user is netconsole. Move the definition into netconsole.c

Signed-off-by: Gustavo Luiz Duarte <gustavold@gmail.com>
Suggested-by: Breno Leitao <leitao@debian.org>
---
 drivers/net/netconsole.c | 9 +++++++++
 include/linux/netpoll.h  | 9 ---------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 0418031b6bc9..810ded6e48f3 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -151,6 +151,15 @@ enum target_state {
 	STATE_DEACTIVATED,
 };
 
+struct inet_addr {
+	/* Address family: AF_UNSPEC when unset, else AF_INET or AF_INET6 */
+	u8			family;
+	union {
+		__be32		ip;
+		struct in6_addr	in6;
+	};
+};
+
 /**
  * struct netconsole_target - Represents a configured netconsole target.
  * @list:	Links this target into the target_list.
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index de97f001a0f9..ec0821a5b02d 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -16,15 +16,6 @@
 #include <linux/ip.h>
 #include <linux/udp.h>
 
-struct inet_addr {
-	/* Address family: AF_UNSPEC when unset, else AF_INET or AF_INET6 */
-	u8			family;
-	union {
-		__be32		ip;
-		struct in6_addr	in6;
-	};
-};
-
 struct netpoll {
 	struct net_device *dev;
 	netdevice_tracker dev_tracker;

-- 
2.55.0


  parent reply	other threads:[~2026-08-10 16:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10 16:47 [PATCH net-next v2 0/6] netconsole: validate a target's IP address configuration Gustavo Luiz Duarte
2026-08-10 16:47 ` [PATCH net-next v2 1/6] netconsole: add an address family to struct inet_addr Gustavo Luiz Duarte
2026-08-11 13:11   ` Breno Leitao
2026-08-10 16:47 ` [PATCH net-next v2 2/6] netconsole: use the address family instead of the ipv6 flag Gustavo Luiz Duarte
2026-08-11 13:14   ` Breno Leitao
2026-08-10 16:47 ` [PATCH net-next v2 3/6] netconsole: reject enabling a target with no remote IP address Gustavo Luiz Duarte
2026-08-11 13:16   ` Breno Leitao
2026-08-10 16:47 ` [PATCH net-next v2 4/6] netconsole: reject a target mixing IPv4 and IPv6 addresses Gustavo Luiz Duarte
2026-08-11 13:20   ` Breno Leitao
2026-08-10 16:47 ` [PATCH net-next v2 5/6] netconsole: show empty string for an unset IP address Gustavo Luiz Duarte
2026-08-11 13:21   ` Breno Leitao
2026-08-10 16:47 ` Gustavo Luiz Duarte [this message]
2026-08-11 13:21   ` [PATCH net-next v2 6/6] netconsole: move struct inet_addr into netconsole.c Breno Leitao

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=20260810-netcons_ipv6-v2-6-3d4fc987a90f@gmail.com \
    --to=gustavold@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.