You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the allocate_register_callback function there is an assert:
assert(curr_num == 0);
This does not seem appropriate. I'd suggest that this should return an error (in the same way that if ps_pmem_map fails an error is returned). The function has no reasonable basis on which to assert curr_num as the FDT contents are well outside the control. (By contrast the assertion assert(token != NULL) seems reasonable as this is controlled by the call to ps_fdt_walk_registers which is in the same module).
I'm not sure what the most appropriate return value would be, or what if this affects other areas as well.
The text was updated successfully, but these errors were encountered:
In the
allocate_register_callback
function there is an assert:This does not seem appropriate. I'd suggest that this should return an error (in the same way that if
ps_pmem_map
fails an error is returned). The function has no reasonable basis on which to assertcurr_num
as the FDT contents are well outside the control. (By contrast the assertionassert(token != NULL)
seems reasonable as this is controlled by the call tops_fdt_walk_registers
which is in the same module).I'm not sure what the most appropriate return value would be, or what if this affects other areas as well.
The text was updated successfully, but these errors were encountered: