[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ff8af85-85d7-4add-8ce1-2629945e193b@intel.com>
Date: Thu, 16 Oct 2025 11:16:07 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>, Jian Shen
<shenjian15@...wei.com>, Salil Mehta <salil.mehta@...wei.com>, Jijie Shao
<shaojijie@...wei.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David S.
Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Sunil Goutham
<sgoutham@...vell.com>, Geetha sowjanya <gakula@...vell.com>, "Subbaraya
Sundeep" <sbhatta@...vell.com>, Bharat Bhushan <bbhushan2@...vell.com>,
"Tariq Toukan" <tariqt@...dia.com>, Brett Creeley <brett.creeley@....com>,
Niklas Söderlund <niklas.soderlund@...natech.se>, "Paul
Barker" <paul@...rker.dev>, Yoshihiro Shimoda
<yoshihiro.shimoda.uh@...esas.com>
CC: <linux-renesas-soc@...r.kernel.org>, Richard Cochran
<richardcochran@...il.com>, Russell King <linux@...linux.org.uk>, "Vladimir
Oltean" <vladimir.oltean@....com>, Simon Horman <horms@...nel.org>,
<netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 2/6] mlx4: convert to ndo_hwtstamp API
On 10/16/2025 11:07 AM, Vadim Fedorenko wrote:
> -static int mlx4_en_hwtstamp_get(struct net_device *dev, struct ifreq
*ifr)
> +static int mlx4_en_hwtstamp_get(struct net_device *dev,
> + struct kernel_hwtstamp_config *config)
> {
> struct mlx4_en_priv *priv = netdev_priv(dev);
>
> - return copy_to_user(ifr->ifr_data, &priv->hwtstamp_config,
> - sizeof(priv->hwtstamp_config)) ? -EFAULT : 0;
> -}
> -
> -static int mlx4_en_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
> -{
> - switch (cmd) {
> - case SIOCSHWTSTAMP:
> - return mlx4_en_hwtstamp_set(dev, ifr);
> - case SIOCGHWTSTAMP:
> - return mlx4_en_hwtstamp_get(dev, ifr);
> - default:
> - return -EOPNOTSUPP;
> - }
> + *config = priv->hwtstamp_config;
> + return 0;
> }
The diff looked very odd here initially because I was confused why
mlx4_en_ioctl wasn't removed. But its just an artifact of the way diff
algorithm works and not being code-aware.
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)
Powered by blists - more mailing lists