Vaibhav Jain <vajai...@vajain21.in.ibm.com.in.ibm.com> writes:
> Thanks for reviewing this patch Mpe,
> Michael Ellerman <eller...@au1.ibm.com> writes:
>> Vaibhav Jain <vaib...@linux.ibm.com> writes:
...
>>
>>> +   /* 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

Reply via email to