Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm/gd32f4: Remove extra lock from gd32f4xx_serial #15382

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

lupyuen
Copy link
Member

@lupyuen lupyuen commented Dec 30, 2024

Summary

An extra lock appears in gd32f4xx_serial due to 2 conflicting PRs:

This PR removes the extra lock in gd32f4xx_serial.

Impact

This PR will fix the gd32f4xx_serial errors reported by nuttx-dashboard.org

Screenshot 2024-12-30 at 1 46 16 PM

Testing

Before this PR: gd32f470zk-eval:nsh fails to build due to duplicate lock
https://github.com/NuttX/nuttx/actions/runs/12539724506/job/34966149597#step:7:998

Configuration/Tool: gd32f470zk-eval/nsh,CONFIG_ARM_TOOLCHAIN_GNU_EABI
Error: chip/gd32f4xx_serial.c:174:19: error: duplicate member 'lock'
  174 |   spinlock_t      lock;          /* Spinlock */
      |                   ^~~~

After this PR: gd32f470zk-eval:nsh builds successfully in Docker
https://gist.github.com/lupyuen/1e4095824e44561517eff9ebc028bfc8

sudo docker run \
  -it \
  ghcr.io/apache/nuttx/apache-nuttx-ci-linux:latest \
  /bin/bash
cd
git clone https://github.com/lupyuen2/wip-nuttx nuttx --branch gd32f4xx_serial
git clone https://github.com/apache/nuttx-apps apps
pushd nuttx ; echo NuttX Source: https://github.com/apache/nuttx/tree/$(git rev-parse HEAD) ; popd
pushd apps  ; echo NuttX Apps: https://github.com/apache/nuttx-apps/tree/$(git rev-parse HEAD) ; popd
cd nuttx
tools/configure.sh gd32f470zk-eval:nsh
make -j

NuttX Source: https://github.com/apache/nuttx/tree/d50cc1c518fb1e68e985df8489bffe4b4d71f22b
NuttX Apps: https://github.com/apache/nuttx-apps/tree/7a36a70e06402b9c1647dcf6833ca5a58e927132
# tools/configure.sh gd32f470zk-eval:nsh
# make -j
Memory region         Used Size  Region Size  %age Used
           flash:      143604 B         3 MB      4.57%
            sram:        6420 B       112 KB      5.60%
CP: nuttx.hex
CP: nuttx.bin

An extra `lock` appears in gd32f4xx_serial due to 2 conflicting PRs:
- apache#7011
- apache#15352

This PR removes the extra `lock` in gd32f4xx_serial.
@github-actions github-actions bot added Arch: arm Issues related to ARM (32-bit) architecture Size: XS The size of the change in this PR is very small labels Dec 30, 2024
@lupyuen
Copy link
Member Author

lupyuen commented Dec 30, 2024

There are 2 extra locks, I'll remove them in the next 2 PRs.

@xiaoxiang781216 xiaoxiang781216 merged commit ce920f9 into apache:master Dec 30, 2024
20 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: arm Issues related to ARM (32-bit) architecture 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.

3 participants