net: ipconfig: use ifreq field aliases
Subsystems (3)
PATCH 1/1 net: ipconfig: use ifreq field aliases
Use the ifr_addr and ifr_name macros instead of the lengthier versions.
Signed-off-by Lalit Shankar Chowdhury <[email protected]>
--- net/ipv4/ipconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv4/ipconfig.c +2 -2
@@ -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",
Signature · 1 line
2.53.0
Ido Schimmel
maintainerQuoted 1 line · Lalit Shankar Chowdhury
Use the
ifr_addrandifr_namemacros instead of the lengthier versions.
Please read the following document before submitting more networking patches:
https://docs.kernel.org/next/process/maintainer-netdev.html
In particular:
https://docs.kernel.org/next/process/maintainer-netdev.html#clean-up-patches
Thanks
Quoted 4 lines · On Wed, 9 Sep 2026 14:44:16 +0000 Lalit Shankar Chowdhury…
Use the
ifr_addrandifr_namemacros instead of the lengthier versions.Signed-off-by Lalit Shankar Chowdhury <[email protected]>---
Why? seems like useless churn. Those header files never change