On 10/24/2025 9:46 AM, Youssef Samir wrote: > From: Pranjal Ramajor Asha Kanojiya <[email protected]> > > Expose sysfs files for each DBC representing the current state of that DBC. > For example, sysfs for DBC ID 0 and accel minor number 0 looks like this, > > /sys/class/accel/accel0/dbc0_state > > Following are the states and their corresponding values, > DBC_STATE_IDLE (0) > DBC_STATE_ASSIGNED (1) > DBC_STATE_BEFORE_SHUTDOWN (2) > DBC_STATE_AFTER_SHUTDOWN (3) > DBC_STATE_BEFORE_POWER_UP (4) > DBC_STATE_AFTER_POWER_UP (5) > > Signed-off-by: Pranjal Ramajor Asha Kanojiya <[email protected]> > Signed-off-by: Youssef Samir <[email protected]>
wrt snprintf->scnprintf change - this feels like a hack around the gcc check and not addressing the warning (i.e. check the return value of s(c)nprintf). While still hacky it seems like all that's needed to avoid the warning is to have the return value written to a variable rather than just dropped. If the value is being saved we might as well check it, especially if userspace is expecting the full explicit name of the sysfs node. Nevermind that the value should never be more than 16, if it's truncating something is very wrong. I could have missed if this is the Standard Way of resolving this warning, but this didn't seem right. -Carl V.
