Subject: Re: [PATCH net-next 6/6] net: hns3: add hwtstamp_get/hwtstamp_set ops

From: Simon Horman <[email-masked]>
Date: Fri, 17 Oct 2025 10:15:14 +0100

On Thu, Oct 16, 2025 at 06:07:27PM +0000, Vadim Fedorenko wrote:

...

> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> index bfa5568baa92..1e9388f1115c 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> @@ -2419,6 +2419,35 @@ static int hns3_nic_do_ioctl(struct net_device *netdev,
>  	return h->ae_algo->ops->do_ioctl(h, ifr, cmd);
>  }
>  
> +static int hns3_nic_hwtstamp_get(struct net_device *netdev,
> +				 struct kernel_hwtstamp_config *config)
> +{
> +	struct hnae3_handle *h = hns3_get_handle(netdev);
> +
> +	if (!netif_running(netdev))
> +		return -EINVAL;
> +
> +	if (!h->ae_algo->ops->hwtstamp_get)
> +		return -EOPNOTSUPP;
> +
> +	return h->ae_algo->ops->hwtstamp_get(h, config);
> +}
> +
> +static int hns3_nic_hwtstamp_set(struct net_device *netdev,
> +				 struct kernel_hwtstamp_config *config,
> +				 struct netlink_ext_ack *extack)
> +{
> +	struct hnae3_handle *h = hns3_get_handle(netdev);
> +
> +	if (!netif_running(netdev))
> +		return -EINVAL;
> +
> +	if (!h->ae_algo->ops->hwtstamp_set)
> +		return -EOPNOTSUPP;
> +
> +	return h->ae_algo->ops->hwtstamp_set(h, config, extack);
> +}
> +
>  static int hns3_nic_set_features(struct net_device *netdev,
>  				 netdev_features_t features)
>  {

Hi Vadim,

I'm sorry to raise this topic again.
But I see the functions above flagged as unused with
this patch applied (for allmodconfig builds).

...