You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "Junbo-Zheng (via GitHub)" <gi...@apache.org> on 2026/10/03 15:45:46 UTC
[PR] Change the remaining sizeof(arr)/sizeof(arr[0]) to nitems [nuttx]
Junbo-Zheng opened a new pull request, #20447:
URL: https://github.com/apache/nuttx/pull/20447
## Summary
Follow-up to 46b25b3849e: replace the remaining open-coded array size computations with nitems(). No functional change.
## Impact
None -- pure mechanical cleanup.
## Testing
Built sim:nsh, nucleo-h743zi:nsh, freedom-k64f:nsh and nucleo-l552ze:nsh on Ubuntu; all clean.
Signed-off-by: Junbo Zheng <zh...@xiaomi.com>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Change the remaining sizeof(arr)/sizeof(arr[0]) to nitems [nuttx]
Posted by "Junbo-Zheng (via GitHub)" <gi...@apache.org>.
Junbo-Zheng commented on code in PR #20447:
URL: https://github.com/apache/nuttx/pull/20447#discussion_r4236086120
##########
tools/nxflat/ldnxflat.c:
##########
@@ -897,7 +896,11 @@ static void select_arch(uint16_t machine)
{
size_t i;
- for (i = 0; i < nitems(g_arches); i++)
+ /* Keep sizeof arithmetic: this host tool builds against the host libc,
Review Comment:
done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Change the remaining sizeof(arr)/sizeof(arr[0]) to nitems [nuttx]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20447:
URL: https://github.com/apache/nuttx/pull/20447#issuecomment-5970789625
<!-- membrowse-pr-comment -->
## <img src="https://membrowse.com/membrowse-logo.svg" height="24" align="top"> MemBrowse Memory Report
*No memory changes detected for:*
- [arduino-mega2560](https://membrowse.com/public/apache/nuttx/target/arduino-mega2560/compare?head=c9a2ceb41bbbbcf762e03f8476db1f0d4e046f90&base=16b8a744174264be833c402bc94465f013a10f0e)
- [esp32-devkitc](https://membrowse.com/public/apache/nuttx/target/esp32-devkitc/compare?head=c9a2ceb41bbbbcf762e03f8476db1f0d4e046f90&base=16b8a744174264be833c402bc94465f013a10f0e)
- [hifive1-revb](https://membrowse.com/public/apache/nuttx/target/hifive1-revb/compare?head=c9a2ceb41bbbbcf762e03f8476db1f0d4e046f90&base=16b8a744174264be833c402bc94465f013a10f0e)
- [mirtoo](https://membrowse.com/public/apache/nuttx/target/mirtoo/compare?head=c9a2ceb41bbbbcf762e03f8476db1f0d4e046f90&base=16b8a744174264be833c402bc94465f013a10f0e)
- [qemu-armv8a](https://membrowse.com/public/apache/nuttx/target/qemu-armv8a/compare?head=c9a2ceb41bbbbcf762e03f8476db1f0d4e046f90&base=16b8a744174264be833c402bc94465f013a10f0e)
- [qemu-intel64](https://membrowse.com/public/apache/nuttx/target/qemu-intel64/compare?head=c9a2ceb41bbbbcf762e03f8476db1f0d4e046f90&base=16b8a744174264be833c402bc94465f013a10f0e)
- [rx65n-rsk2mb](https://membrowse.com/public/apache/nuttx/target/rx65n-rsk2mb/compare?head=c9a2ceb41bbbbcf762e03f8476db1f0d4e046f90&base=16b8a744174264be833c402bc94465f013a10f0e)
- [s698pm-dkit](https://membrowse.com/public/apache/nuttx/target/s698pm-dkit/compare?head=c9a2ceb41bbbbcf762e03f8476db1f0d4e046f90&base=16b8a744174264be833c402bc94465f013a10f0e)
- [stm32-nucleo-f103rb](https://membrowse.com/public/apache/nuttx/target/stm32-nucleo-f103rb/compare?head=c9a2ceb41bbbbcf762e03f8476db1f0d4e046f90&base=16b8a744174264be833c402bc94465f013a10f0e)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Change the remaining sizeof(arr)/sizeof(arr[0]) to nitems [nuttx]
Posted by "Junbo-Zheng (via GitHub)" <gi...@apache.org>.
Junbo-Zheng commented on PR #20447:
URL: https://github.com/apache/nuttx/pull/20447#issuecomment-6092408422
> @Junbo-Zheng please fix the conflicts
@acassis
All comments addressed, please help re-review.
Note:
- the Linux (arm-14) failure (lm3s6965-ek:qemu-flat flash overflow) is a pre-existing master issue, not related to this change.
- please ignore the "Mixed case identifier found" warnings in spifilib_fam_standard_cmd.c
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Change the remaining sizeof(arr)/sizeof(arr[0]) to nitems [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #20447:
URL: https://github.com/apache/nuttx/pull/20447#issuecomment-6067286856
@Junbo-Zheng please fix the conflicts
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Change the remaining sizeof(arr)/sizeof(arr[0]) to nitems [nuttx]
Posted by "Junbo-Zheng (via GitHub)" <gi...@apache.org>.
Junbo-Zheng commented on PR #20447:
URL: https://github.com/apache/nuttx/pull/20447#issuecomment-6093219384
> @Junbo-Zheng add Mix case to nxstyle.c whitelist:
>
> ```
> Error: /home/runner/work/nuttx/nuttx/nuttx/arch/arm/src/lpc43xx/spifi/src/spifilib_fam_standard_cmd.c:50:19: error: Mixed case identifier found
> ```
done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Change the remaining sizeof(arr)/sizeof(arr[0]) to nitems [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #20447:
URL: https://github.com/apache/nuttx/pull/20447#issuecomment-6093106408
@Junbo-Zheng add Mix case to nxstyle.c whitelist:
```
Error: /home/runner/work/nuttx/nuttx/nuttx/arch/arm/src/lpc43xx/spifi/src/spifilib_fam_standard_cmd.c:50:19: error: Mixed case identifier found
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Change the remaining sizeof(arr)/sizeof(arr[0]) to nitems [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #20447:
URL: https://github.com/apache/nuttx/pull/20447#discussion_r4235989572
##########
tools/nxflat/ldnxflat.c:
##########
@@ -897,7 +896,11 @@ static void select_arch(uint16_t machine)
{
size_t i;
- for (i = 0; i < nitems(g_arches); i++)
+ /* Keep sizeof arithmetic: this host tool builds against the host libc,
Review Comment:
remove from the first patch directly
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Change the remaining sizeof(arr)/sizeof(arr[0]) to nitems [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #20447:
URL: https://github.com/apache/nuttx/pull/20447
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org