[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<AM9PR04MB85052DADEB4DABF9C7F83BED888AA@AM9PR04MB8505.eurprd04.prod.outlook.com>
Date: Fri, 9 May 2025 03:15:40 +0000
From: Wei Fang <wei.fang@....com>
To: Vladimir Oltean <vladimir.oltean@....com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>
CC: Köry Maincent <kory.maincent@...tlin.com>, Clark Wang
<xiaoning.wang@....com>, Andrew Lunn <andrew@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Claudiu Manoil
<claudiu.manoil@....com>, Simon Horman <horms@...nel.org>, Richard Cochran
<richardcochran@...il.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next] net: enetc: convert to ndo_hwtstamp_get() and
ndo_hwtstamp_set()
> -static int enetc_hwtstamp_set(struct net_device *ndev, struct ifreq *ifr)
> +int enetc_hwtstamp_set(struct net_device *ndev,
> + struct kernel_hwtstamp_config *config,
> + struct netlink_ext_ack *extack)
> +EXPORT_SYMBOL_GPL(enetc_hwtstamp_set);
>
> -static int enetc_hwtstamp_get(struct net_device *ndev, struct ifreq *ifr)
> +int enetc_hwtstamp_get(struct net_device *ndev,
> + struct kernel_hwtstamp_config *config)
> +EXPORT_SYMBOL_GPL(enetc_hwtstamp_get);
The definitions of enetc_hwtstamp_set() and enetc_hwtstamp_set()
should also be wrapped with:
#if IS_ENABLED(CONFIG_FSL_ENETC_PTP_CLOCK)
#endif
Otherwise, there will be some compilation errors when
CONFIG_FSL_ENETC_PTP_CLOCK is not enabled.
> +#if IS_ENABLED(CONFIG_FSL_ENETC_PTP_CLOCK)
> +
> +int enetc_hwtstamp_get(struct net_device *ndev,
> + struct kernel_hwtstamp_config *config);
> +int enetc_hwtstamp_set(struct net_device *ndev,
> + struct kernel_hwtstamp_config *config,
> + struct netlink_ext_ack *extack);
> +
> +#else
> +
> +#define enetc_hwtstamp_get(ndev, config) NULL
> +#define enetc_hwtstamp_set(ndev, config, extack) NULL
checkpatch.pl reports some warnings, for example:
WARNING: Argument 'ndev' is not used in function-like macro
#140: FILE: drivers/net/ethernet/freescale/enetc/enetc.h:531:
+#define enetc_hwtstamp_get(ndev, config) NULL
And there are also compilation errors when
CONFIG_FSL_ENETC_PTP_CLOCK is not enabled. It should be
modified as follows.
#define enetc_hwtstamp_get NULL
#define enetc_hwtstamp_set NULL
Powered by blists - more mailing lists