Re: [PATCH net-next] aqc111: Correct endianness handling in rx/tx_fixup

From: Birger Koblitz

Date: Sun Nov 22 2026 - 02:39:06 EST


Hi Andrew,

thanks for looking at this!
On 19/11/2026 8:41 pm, Andrew Lunn wrote:
- desc_hdr = le64_to_cpup((u64 *)skb_tail_pointer(skb));
+ desc_hdr = get_unaligned_le64((__le64 *)skb_tail_pointer(skb));

static inline u64 get_unaligned_le64(const void *p)
{
return le64_to_cpu(__get_unaligned_t(__le64, p));
}

You should cast to a void *, not __le64 *. I'm not even sure a cast is
needed:

static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)
{
return skb->head + skb->tail;
}

The compiler should do an implicit cast.

Andrew
Indeed, no cast is needed:
desc_hdr = get_unaligned_le64(skb_tail_pointer(skb));
compiles and makes sparse happy:
$ make C=1 drivers/net/
DESCEND objtool
CC [M] drivers/net/usb/aqc111.o
CHECK drivers/net/usb/aqc111.c

I will re-send, also taking the comments from the LLM into account.

Birger