mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Birger Koblitz <mail@birger-koblitz.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] aqc111: Correct endianness handling in rx/tx_fixup
Date: Sun, 22 Nov 2026 08:38:40 +0100	[thread overview]
Message-ID: <407c557f-1d95-4a69-8cf6-4475e769d65f@birger-koblitz.de> (raw)
In-Reply-To: <29ba76c6-5feb-4f07-90b6-20468b62d602@lunn.ch>

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

  reply	other threads:[~2026-11-22  7:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 18:28 Birger Koblitz
2026-11-17 18:33 ` netdev-bot+sinfo
2026-11-19 19:41 ` Andrew Lunn
2026-11-22  7:38   ` Birger Koblitz [this message]
2026-11-22 12:47     ` Daniel Golle
2026-11-20  6:29 ` netdev-bot+sashiko
2026-11-22 10:55   ` Birger Koblitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=407c557f-1d95-4a69-8cf6-4475e769d65f@birger-koblitz.de \
    --to=mail@birger-koblitz.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®