From: sashiko-bot@kernel.org
To: "Birger Koblitz" <mail@birger-koblitz.de>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] net: usb: ax88179: Add PTP data structures and definitions
Date: Mon, 30 Nov 2026 09:30:19 +0000 [thread overview]
Message-ID: <sashiko-outbox-240775@kernel.org> (raw)
In-Reply-To: <20261129-ptp-v1-1-8148c402beaf@birger-koblitz.de>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] net: usb: ax88179: 32-bit shift overflow in AX179A_RX_PD_PTP
BIT(56)
--
commit b639231242b9a5584ff7eca0b050d1ec24065223
Author: Birger Koblitz <mail@birger-koblitz.de>
net: usb: ax88179: Add PTP data structures and definitions
This commit adds a PTP pointer to ax88179_data, defines PTP-related registers
and RX descriptor flags, and introduces 32-bit USB register write support.
> diff --git a/drivers/net/usb/ax88179_lib.h b/drivers/net/usb/ax88179_lib.h
> index 401c0bed3d28b..0a73111c0211b 100644
> --- a/drivers/net/usb/ax88179_lib.h
> +++ b/drivers/net/usb/ax88179_lib.h
[ ... ]
> @@ -261,11 +263,13 @@
> #define AX179A_RX_PD_L3_IP 0x20
> #define AX179A_RX_PD_L3_IP6 0x40
>
> +#define AX179A_RX_PD_HDR_CRC_ERR BIT(7)
> #define AX179A_RX_PD_VLAN BIT(10)
> #define AX179A_RX_PD_RX_OK BIT(11)
> #define AX179A_RX_PD_DROP BIT(31)
> #define AX179A_RX_PD_LEN GENMASK(30, 16)
> #define AX179A_RX_PD_VLAN_SHIFT 0x20
> +#define AX179A_RX_PD_PTP BIT(56)
[Severity: Medium]
Should AX179A_RX_PD_PTP use BIT_ULL(56) or BIT_U64(56) instead of BIT(56)?
BIT() shifts an unsigned long, so on 32-bit architectures BIT(56) overflows
a 32-bit shift count, triggering a -Wshift-count-overflow compiler warning
(or build failure with CONFIG_WERROR) and failing to match bit 56 of the
64-bit RX packet descriptor.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261129-ptp-v1-0-8148c402beaf@birger-koblitz.de?part=1
next prev parent reply other threads:[~2026-11-30 9:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 9:29 [PATCH net-next 0/3] net: usb: ax88179: Add support for PTP Birger Koblitz
2026-11-29 9:29 ` [PATCH net-next 1/3] net: usb: ax88179: Add PTP data structures and definitions Birger Koblitz
2026-11-30 9:30 ` sashiko-bot [this message]
2026-11-29 9:29 ` [PATCH net-next 2/3] net: usb: ax88179: Add PTP Implementation Birger Koblitz
2026-11-29 18:31 ` Manuel Ebner
2026-11-30 5:18 ` Birger Koblitz
2026-11-30 9:30 ` sashiko-bot
2026-11-29 9:29 ` [PATCH net-next 3/3] net: usb: ax88179: Enable PTP Birger Koblitz
2026-11-29 15:48 ` Andrew Lunn
2026-11-29 17:24 ` Birger Koblitz
2026-11-29 21:09 ` Andrew Lunn
2026-11-29 21:18 ` kernel test robot
2026-11-30 9:30 ` sashiko-bot
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=sashiko-outbox-240775@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mail@birger-koblitz.de \
--cc=sashiko-reviews@lists.linux.dev \
/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