Kinsey Moore commented on a discussion on 
bsps/shared/dev/spi/xqspipsu-flash-helper.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/90#note_107963

 >     * Indicate the transfer on the QSPIPSU bus is no longer in progress
 >     * regardless of the status event
 >     */
 > -  TransferInProgress = FALSE;
 > +  rtems_status_code sc = rtems_event_transient_send(TransferTask);
 > +  if (sc != RTEMS_SUCCESSFUL) {
 > +    Error++;

This particular file was originally sourced from the Xilinx repo, but is not in 
its original form as its original form was not suitable for purpose.

This file is now owned by RTEMS as an adapter of sorts. Unfortunately, this 
Error variable is not part of the QSPI driver, but part of the flash wrapper 
code that was brought in. It's technically possible to remove the Error 
variable here by resetting the status handler prior to each call which would 
allow replacing the void* argument that's passed in, but that runs the risk of 
leaving a stale pointer into the stack since you can't pass NULL for that field 
to clear it out (there's an assertion in the underlying code preventing it). 
This could be rectified by a global struct that houses the XQspiPsu pointer 
(currently unused) and additional NOR-layer attributes such as the error 
counter.

Realistically, nothing consumes the error count and it can just be removed 
until it's actually needed. I'll add another commit that removes it.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/90#note_107963
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to