Vaibhav Jain [off-list ref] writes:
Thanks for reviewing this patch Mpe,
Michael Ellerman [off-list ref] writes:
quoted
Vaibhav Jain [off-list ref] writes:
...
quoted
quoted
+ /* Check for various masks in bitmap and set the buffer */
+ if (health & PAPR_SCM_DIMM_UNARMED_MASK)
+ rc += sprintf(buf, "not_armed ");
I know buf is "big enough" but using sprintf() in 2020 is a bit ... :)
seq_buf is a pretty thin wrapper over a buffer you can use to make this
cleaner and also handles overflow for you.
See eg. show_user_instructions() for an example.
Unfortunatly seq_buf_printf() is still not an exported symbol hence not
usable in external modules.
Send a patch? :)
cheers