From: sashiko-bot@kernel.org
To: "Kyle Farrell" <kaf@nwlink.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v3 1/3] usb: gadget: f_uac2: avoid truncating calculated bandwidth
Date: Tue, 03 Nov 2026 21:25:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-196053@kernel.org> (raw)
In-Reply-To: <20261103211434.996135-2-kaf@nwlink.com>
> get_max_bw_for_bint() calculates the required bandwidth using 32-bit
> arithmetic and stores the result in a u16. A result above U16_MAX
> is truncated before set_ep_max_packet_size_bint() compares it against
> the endpoint maximum. The truncated value can appear to fit, bypassing
> the clamp and warning and advertising a too-small wMaxPacketSize.
>
> Use u32 for the calculated value, the return type of
> get_max_bw_for_bint() and the caller's local variable, and print it
> with %u. A packet size above the endpoint maximum remains clamped
> before it is stored in the 16-bit wMaxPacketSize field.
>
> Signed-off-by: Kyle Farrell <kaf@nwlink.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103211434.996135-1-kaf@nwlink.com?part=1
next prev parent reply other threads:[~2026-11-03 21:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 21:14 [PATCH v3 0/3] usb: gadget: f_uac2: allow explicit channel count independent of channel mask Kyle Farrell
2026-11-03 21:14 ` [PATCH v3 1/3] usb: gadget: f_uac2: avoid truncating calculated bandwidth Kyle Farrell
2026-11-03 21:25 ` sashiko-bot [this message]
2026-11-03 21:14 ` [PATCH v3 2/3] usb: gadget: u_audio: pass channel counts explicitly Kyle Farrell
2026-11-03 21:24 ` sashiko-bot
2026-11-03 21:14 ` [PATCH v3 3/3] usb: gadget: f_uac2: allow explicit channel count independent of channel mask Kyle Farrell
2026-11-03 21:24 ` 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-196053@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kaf@nwlink.com \
--cc=linux-usb@vger.kernel.org \
--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