[PATCH v5 1/4] powerpc/papr_scm: Fetch nvdimm health information from PHYP

Michael Ellerman ellerman at au1.ibm.com
Fri Apr 3 10:53:55 AEDT 2020


Vaibhav Jain <vajain21 at vajain21.in.ibm.com.in.ibm.com> writes:
> Thanks for reviewing this patch Mpe,
> Michael Ellerman <ellerman at au1.ibm.com> writes:
>> Vaibhav Jain <vaibhav at 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



More information about the Linuxppc-dev mailing list