RTEMS | bsps/shared/dev/flash: Add a flashdev simulation backend (!863)
Joel Sherrill (@joel)
gitlab at rtems.org
Thu Dec 4 18:43:05 UTC 2025
Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/863 was reviewed by Joel Sherrill
--
Joel Sherrill started a new discussion on bsps/include/dev/flash/flash_sim_flashdev.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/863#note_136664
> +/* SPDX-License-Identifier: BSD-2-Clause */
> +
Missing Doxygen @file block
--
Joel Sherrill started a new discussion on bsps/include/dev/flash/flash_sim_flashdev.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/863#note_136665
> +#endif
> +
> +/* @brief Configuration options for NAND simulation */
These are not Doxygen comments.
--
Joel Sherrill started a new discussion on bsps/include/dev/flash/flash_sim_flashdev.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/863#note_136666
> +};
> +
> +/*
Again.
--
Joel Sherrill started a new discussion on bsps/shared/dev/flash/flash_sim_flashdev.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/863#note_136667
> +#define NAND_SIM_FLASH_MAX_REGIONS ( (size_t) 32 )
> +
> +/*
Not Doxygen comment.
--
Joel Sherrill started a new discussion on bsps/shared/dev/flash/flash_sim_flashdev.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/863#note_136668
> +
> +static int flash_sim_get_flash_type(
> + rtems_flashdev *flash,
For all the methods, there is no error checking of parameters. Can they always be trusted? Should there be debug assertions?
--
Joel Sherrill started a new discussion on bsps/shared/dev/flash/flash_sim_flashdev.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/863#note_136669
> + if (attr->alloc != NULL) {
> + return attr->alloc(size);
> + } else {
Having this second half in an else is unnecessary and makes it look like the function can fall out the bottom.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/863
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20251204/a51ab86d/attachment-0001.htm>
More information about the bugs
mailing list