Skip to contentSkip to conversation

Remove __get_unaligned_cpu32 from netronome drivers

PATCH In review Julian Vetter 2 participants 2 messages Apr 3, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove __get_unaligned_cpu32 from netronome drivers

The __{get,put}_unaligned_cpu{16,32,64} functions are deprecated, and only a small number of drivers still use them. So, replace it here with the more generic get_unaligned() function and just cast the input parameter.

---
 drivers/net/ethernet/netronome/nfp/nfd3/dp.c | 2 +-
 drivers/net/ethernet/netronome/nfp/nfdk/dp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/netronome/nfp/nfd3/dp.c +1 -1
index f1c6c47564b1..08086eb76996 100644
@@ -779,7 +779,7 @@ nfp_nfd3_parse_meta(struct net_device *netdev, struct nfp_meta_parsed *meta,
 		case NFP_NET_META_CSUM:
 			meta->csum_type = CHECKSUM_COMPLETE;
 			meta->csum =
-				(__force __wsum)__get_unaligned_cpu32(data);
+				(__force __wsum)get_unaligned((u32 *)data);
 			data += 4;
 			break;
 		case NFP_NET_META_RESYNC_INFO:
drivers/net/ethernet/netronome/nfp/nfdk/dp.c +1 -1
index ebeb6ab4465c..ab3cd06ed63e 100644
@@ -779,7 +779,7 @@ nfp_nfdk_parse_meta(struct net_device *netdev, struct nfp_meta_parsed *meta,
 		case NFP_NET_META_CSUM:
 			meta->csum_type = CHECKSUM_COMPLETE;
 			meta->csum =
-				(__force __wsum)__get_unaligned_cpu32(data);
+				(__force __wsum)get_unaligned((u32 *)data);
 			data += 4;
 			break;
 		case NFP_NET_META_RESYNC_INFO:
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 1 line · On Thu, 3 Apr 2025 11:07:43 +0200 Julian Vetter wrote:

Subject: [PATCH] Remove __get_unaligned_cpu32 from netronome drivers

Since the merge window is still ongoing we don't accept code cleanups:
https://netdev.bots.linux.dev/net-next.html

Could you repost on Monday with the right subject prefix?

eth: nfp: remove __get_unaligned_cpu32 from netronome drivers

Signature · 1 line
pw-bot: defer