diff mbox series

[net-next] net: remove IFF_* re-definition

Message ID 20240801163401.378723-1-kuba@kernel.org (mailing list archive)
State Accepted
Commit 49675f5bdf9ae2624b430dafda4cb29024521625
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: remove IFF_* re-definition | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next, async
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 87 this patch: 87
netdev/build_tools success Errors and warnings before: 10 this patch: 10
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 137 this patch: 137
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 4213 this patch: 4213
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 38 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 22 this patch: 22
netdev/source_inline success Was 0 now: 0
netdev/contest warning net-next-2024-08-01--21-00 (tests: 346)

Commit Message

Jakub Kicinski Aug. 1, 2024, 4:34 p.m. UTC
We re-define values of enum netdev_priv_flags as preprocessor
macros with the same name. I guess this was done to avoid breaking
out of tree modules which may use #ifdef X for kernel compatibility?
Commit 7aa98047df95 ("net: move net_device priv_flags out from UAPI")
which added the enum doesn't say. In any case, the flags with defines
are quite old now, and defines for new flags don't get added.
OOT drivers have to resort to code greps for compat detection, anyway.
Let's delete these defines, save LoC, help LXR link to the right place.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 include/linux/netdevice.h | 32 --------------------------------
 1 file changed, 32 deletions(-)

Comments

Simon Horman Aug. 1, 2024, 7:36 p.m. UTC | #1
On Thu, Aug 01, 2024 at 09:34:01AM -0700, Jakub Kicinski wrote:
> We re-define values of enum netdev_priv_flags as preprocessor
> macros with the same name. I guess this was done to avoid breaking
> out of tree modules which may use #ifdef X for kernel compatibility?
> Commit 7aa98047df95 ("net: move net_device priv_flags out from UAPI")
> which added the enum doesn't say. In any case, the flags with defines
> are quite old now, and defines for new flags don't get added.
> OOT drivers have to resort to code greps for compat detection, anyway.
> Let's delete these defines, save LoC, help LXR link to the right place.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Simon Horman <horms@kernel.org>
Jiri Pirko Aug. 2, 2024, 6:58 a.m. UTC | #2
Thu, Aug 01, 2024 at 06:34:01PM CEST, kuba@kernel.org wrote:
>We re-define values of enum netdev_priv_flags as preprocessor
>macros with the same name. I guess this was done to avoid breaking
>out of tree modules which may use #ifdef X for kernel compatibility?
>Commit 7aa98047df95 ("net: move net_device priv_flags out from UAPI")
>which added the enum doesn't say. In any case, the flags with defines
>are quite old now, and defines for new flags don't get added.
>OOT drivers have to resort to code greps for compat detection, anyway.
>Let's delete these defines, save LoC, help LXR link to the right place.
>
>Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
patchwork-bot+netdevbpf@kernel.org Aug. 2, 2024, 11:30 p.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu,  1 Aug 2024 09:34:01 -0700 you wrote:
> We re-define values of enum netdev_priv_flags as preprocessor
> macros with the same name. I guess this was done to avoid breaking
> out of tree modules which may use #ifdef X for kernel compatibility?
> Commit 7aa98047df95 ("net: move net_device priv_flags out from UAPI")
> which added the enum doesn't say. In any case, the flags with defines
> are quite old now, and defines for new flags don't get added.
> OOT drivers have to resort to code greps for compat detection, anyway.
> Let's delete these defines, save LoC, help LXR link to the right place.
> 
> [...]

Here is the summary with links:
  - [net-next] net: remove IFF_* re-definition
    https://git.kernel.org/netdev/net-next/c/49675f5bdf9a

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 607009150b5f..0ef3eaa23f4b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1689,38 +1689,6 @@  enum netdev_priv_flags {
 	IFF_SEE_ALL_HWTSTAMP_REQUESTS	= BIT_ULL(33),
 };
 
-#define IFF_802_1Q_VLAN			IFF_802_1Q_VLAN
-#define IFF_EBRIDGE			IFF_EBRIDGE
-#define IFF_BONDING			IFF_BONDING
-#define IFF_ISATAP			IFF_ISATAP
-#define IFF_WAN_HDLC			IFF_WAN_HDLC
-#define IFF_XMIT_DST_RELEASE		IFF_XMIT_DST_RELEASE
-#define IFF_DONT_BRIDGE			IFF_DONT_BRIDGE
-#define IFF_DISABLE_NETPOLL		IFF_DISABLE_NETPOLL
-#define IFF_MACVLAN_PORT		IFF_MACVLAN_PORT
-#define IFF_BRIDGE_PORT			IFF_BRIDGE_PORT
-#define IFF_OVS_DATAPATH		IFF_OVS_DATAPATH
-#define IFF_TX_SKB_SHARING		IFF_TX_SKB_SHARING
-#define IFF_UNICAST_FLT			IFF_UNICAST_FLT
-#define IFF_TEAM_PORT			IFF_TEAM_PORT
-#define IFF_SUPP_NOFCS			IFF_SUPP_NOFCS
-#define IFF_LIVE_ADDR_CHANGE		IFF_LIVE_ADDR_CHANGE
-#define IFF_MACVLAN			IFF_MACVLAN
-#define IFF_XMIT_DST_RELEASE_PERM	IFF_XMIT_DST_RELEASE_PERM
-#define IFF_L3MDEV_MASTER		IFF_L3MDEV_MASTER
-#define IFF_NO_QUEUE			IFF_NO_QUEUE
-#define IFF_OPENVSWITCH			IFF_OPENVSWITCH
-#define IFF_L3MDEV_SLAVE		IFF_L3MDEV_SLAVE
-#define IFF_TEAM			IFF_TEAM
-#define IFF_RXFH_CONFIGURED		IFF_RXFH_CONFIGURED
-#define IFF_PHONY_HEADROOM		IFF_PHONY_HEADROOM
-#define IFF_MACSEC			IFF_MACSEC
-#define IFF_NO_RX_HANDLER		IFF_NO_RX_HANDLER
-#define IFF_FAILOVER			IFF_FAILOVER
-#define IFF_FAILOVER_SLAVE		IFF_FAILOVER_SLAVE
-#define IFF_L3MDEV_RX_HANDLER		IFF_L3MDEV_RX_HANDLER
-#define IFF_TX_SKB_NO_LINEAR		IFF_TX_SKB_NO_LINEAR
-
 /* Specifies the type of the struct net_device::ml_priv pointer */
 enum netdev_ml_priv_type {
 	ML_PRIV_NONE,