Skip to content

drivers/usbhost: Remove stale MAX3421E enumeration warning. - #20960

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
xiaoxiang781216:fix/max3421e-ci-warning
Oct 24, 2026
Merged

xiaoxiang781216 merged 1 commit into
apache:masterfrom
xiaoxiang781216:fix/max3421e-ci-warning

Conversation

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

Summary

Remove the stale REVISIT #warning from max3421e_enumerate(). The apostrophe in its unquoted text is parsed as an unterminated character literal. With -Werror, this fails the build even when preprocessor warnings are disabled.

This fixes the stm32f103-minimum/usbhost build failure observed in #20938:
https://github.com/apache/nuttx/actions/runs/40071853385/job/120807219487?pr=20938

No dependencies or companion NuttX Apps changes are required.

Impact

Build-only fix for the MAX3421E USB host driver. Removes two lines without changing executable code, runtime behavior, public interfaces, or configuration.

Testing

Host: Linux. Compiler: arm-none-eabi-gcc 13.2.1 20231009.

Original CI failure (stm32f103-minimum/usbhost):

usbhost/usbhost_max3421e.c:3606:23: error: missing terminating ' character [-Werror]
 3606 | #warning REVISIT:  Isn't this already done?
cc1: all warnings being treated as errors

Locally reproduced the diagnostic by passing the original directive to:

arm-none-eabi-gcc -Werror -Wno-cpp -x c -fsyntax-only -
<stdin>:1:23: error: missing terminating ' character [-Werror]
cc1: all warnings being treated as errors

After removing the directive, the same focused compiler check exits with status 0. This is a preprocessor diagnostic check, not a full driver or board build.

Validation on the upstream-based fix branch:

git diff --check: PASS
git diff | tools/checkpatch.sh -: All checks pass.

No full board build or hardware runtime test was performed. This change removes only a diagnostic directive; upstream CI must verify the complete board build.

Contribution status

AI assistance is disclosed in the commit's Assisted-by and Co-authored-by trailers. The commit currently has no Signed-off-by: NuttX requires that certification to be added by a human contributor, so human sign-off remains outstanding.

Remove the REVISIT preprocessor warning in max3421e_enumerate(). Its unquoted apostrophe is diagnosed as a missing terminating character literal, which becomes a build error under -Werror even when preprocessor warnings are disabled.

This fixes the stm32f103-minimum/usbhost CI failure reported in apache#20938 without changing runtime behavior.

Validated with git diff --check and tools/checkpatch.sh. Reproduced the original diagnostic with arm-none-eabi-gcc 13.2.1 on Linux; the removed directive no longer produces the diagnostic. No full board build or hardware runtime test was performed.

Assisted-by: Copilot SDK in VS Code
Signed-off-by: Xiang Xiao <[email protected]>
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: USB Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants