From: Lalit Shankar Chowdhury <lalitshankarch@gmail.com>
To: David Ahern <dsahern@kernel.org>,
Ido Schimmel <idosch@nvidia.com>,
"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>,
netdev@vger.kernel.org (open list:NETWORKING [IPv4/IPv6]),
linux-kernel@vger.kernel.org (open list)
Cc: Lalit Shankar Chowdhury <lalitshankarch@gmail.com>
Subject: [PATCH] net: ipconfig: use ifreq field aliases
Date: Wed, 9 Sep 2026 14:44:16 +0000 [thread overview]
Message-ID: <20260909144417.28871-1-lalitshankarch@gmail.com> (raw)
Use the ifr_addr and ifr_name macros instead of the lengthier versions.
Signed-off-by: Lalit Shankar Chowdhury <lalitshankarch@gmail.com>
---
net/ipv4/ipconfig.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 155db067eaec..475393a86c91 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -367,11 +367,11 @@ set_sockaddr(struct sockaddr_in *sin, __be32 addr, __be16 port)
static int __init ic_setup_if(void)
{
struct ifreq ir;
- struct sockaddr_in *sin = (void *) &ir.ifr_ifru.ifru_addr;
+ struct sockaddr_in *sin = (void *) &ir.ifr_addr;
int err;
memset(&ir, 0, sizeof(ir));
- strcpy(ir.ifr_ifrn.ifrn_name, ic_dev->dev->name);
+ strcpy(ir.ifr_name, ic_dev->dev->name);
set_sockaddr(sin, ic_myaddr, 0);
if ((err = devinet_ioctl(&init_net, SIOCSIFADDR, &ir)) < 0) {
pr_err("IP-Config: Unable to set interface address (%d)\n",
--
2.53.0
next reply other threads:[~2026-09-09 14:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 14:44 Lalit Shankar Chowdhury [this message]
2026-09-10 10:31 ` [PATCH] net: ipconfig: use ifreq field aliases Ido Schimmel
2026-09-10 18:19 ` Stephen Hemminger
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=20260909144417.28871-1-lalitshankarch@gmail.com \
--to=lalitshankarch@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.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.