On Thu, Sep 03, 2026 at 10:42:19AM +0800, James Lee wrote:
...
> +static void mctp_usblib_test_rx_header_splits(struct kunit *test)
> +{
> + struct mctp_usblib_test_dev *dev;
> + struct mctp_usblib_test_ctx *ctx;
> + struct mctp_usblib_rx *rx;
> + size_t i;
Hi James,
This is a minor problem and it is addressed in the following patch,
by removing the line above, but i is declared yet unused and should
not be added here.
Flagged by W=1 builds with GCC 16.2.0 and Clang 22.1.8.
> +
> + ctx = mctp_usblib_test_init(test);
> + rx = mctp_usblib_test_rx_init(test, true);
> + dev = ctx->dev;
> +
> + /* Unrolling here so stack traces point to the invocation with the
> + * failing length.
> + */
> + mctp_usblib_test_rx_split_header(test, 1, dev, rx);
> + mctp_usblib_test_rx_split_header(test, 2, dev, rx);
> + mctp_usblib_test_rx_split_header(test, 3, dev, rx);
> + mctp_usblib_test_rx_split_header(test, 4, dev, rx);
> + mctp_usblib_test_rx_split_header(test, 5, dev, rx);
> + mctp_usblib_test_rx_split_header(test, 6, dev, rx);
> + mctp_usblib_test_rx_split_header(test, 7, dev, rx);
> + mctp_usblib_test_rx_split_header(test, 8, dev, rx);
> +}
...