diff options
author | Alexander Lobakin <aleksander.lobakin@intel.com> | 2024-08-29 14:33:36 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-09-03 11:36:43 +0200 |
commit | beb5a9bea8239cdf4adf6b62672e30db3e9fa5ce (patch) | |
tree | 0b926da32eb766c8fa65ba909606be8011cf59c9 /drivers/net/ethernet/microchip | |
parent | 075e3d30e4a3da8eadd12f2f063dc8e2ea9e1f08 (diff) | |
download | linux-beb5a9bea8239cdf4adf6b62672e30db3e9fa5ce.tar.gz linux-beb5a9bea8239cdf4adf6b62672e30db3e9fa5ce.tar.bz2 linux-beb5a9bea8239cdf4adf6b62672e30db3e9fa5ce.zip |
netdevice: convert private flags > BIT(31) to bitfields
Make dev->priv_flags `u32` back and define bits higher than 31 as
bitfield booleans as per Jakub's suggestion. This simplifies code
which accesses these bits with no optimization loss (testb both
before/after), allows to not extend &netdev_priv_flags each time,
but also scales better as bits > 63 in the future would only add
a new u64 to the structure with no complications, comparing to
that extending ::priv_flags would require converting it to a bitmap.
Note that I picked `unsigned long :1` to not lose any potential
optimizations comparing to `bool :1` etc.
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/microchip')
-rw-r--r-- | drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c index ec672af12e25..534d4716d5f7 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c @@ -816,7 +816,7 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p, NETIF_F_HW_VLAN_STAG_TX | NETIF_F_HW_TC; dev->hw_features |= NETIF_F_HW_TC; - dev->priv_flags |= IFF_SEE_ALL_HWTSTAMP_REQUESTS; + dev->see_all_hwtstamp_requests = true; dev->needed_headroom = IFH_LEN_BYTES; eth_hw_addr_gen(dev, lan966x->base_mac, p + 1); |