From: Michael Ellerman <ellerman@au1•ibm.com>
To: Vaibhav Jain <vajain21@vajain21•in.ibm.com.in.ibm.com>,
Vaibhav Jain <vaibhav@linux•ibm.com>,
linuxppc-dev@lists•ozlabs.org, linux-nvdimm@lists•01.org
Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux•ibm.com>,
Jeff Moyer <jmoyer@redhat•com>,
alastair@linux•ibm.com, Oliver O'Halloran <oohall@gmail•com>,
Vishal Verma <vishal.l.verma@intel•com>,
Vaibhav Jain <vaibhav@linux•ibm.com>,
Dan Williams <dan.j.williams@intel•com>
Subject: Re: [PATCH v5 1/4] powerpc/papr_scm: Fetch nvdimm health information from PHYP
Date: Fri, 03 Apr 2020 10:53:55 +1100 [thread overview]
Message-ID: <87y2rdsauk.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <87o8s9g2nv.fsf@vajain21.in.ibm.com>
Vaibhav Jain <vajain21@vajain21•in.ibm.com.in.ibm.com> writes:
> Thanks for reviewing this patch Mpe,
> Michael Ellerman <ellerman@au1•ibm.com> writes:
>> Vaibhav Jain <vaibhav@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
next prev parent reply other threads:[~2020-04-02 23:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 14:32 [PATCH v5 0/4] powerpc/papr_scm: Add support for reporting nvdimm health Vaibhav Jain
2020-03-31 14:32 ` [PATCH v5 1/4] powerpc/papr_scm: Fetch nvdimm health information from PHYP Vaibhav Jain
2020-04-01 5:30 ` Aneesh Kumar K.V
2020-04-02 3:08 ` Dan Williams
2020-04-03 0:58 ` Dan Williams
2020-04-02 10:20 ` Michael Ellerman
[not found] ` <87o8s9g2nv.fsf@vajain21.in.ibm.com>
2020-04-02 23:53 ` Michael Ellerman [this message]
2020-03-31 14:32 ` [PATCH v5 2/4] ndctl/uapi: Introduce NVDIMM_FAMILY_PAPR_SCM as a new NVDIMM DSM family Vaibhav Jain
2020-04-01 5:31 ` Aneesh Kumar K.V
2020-04-03 16:50 ` Dan Williams
2020-03-31 14:32 ` [PATCH v5 3/4] powerpc/papr_scm, uapi: Add support for handling PAPR DSM commands Vaibhav Jain
2020-04-01 5:32 ` [PATCH v5 3/4] powerpc/papr_scm,uapi: " Aneesh Kumar K.V
2020-04-03 17:40 ` Dan Williams
2020-03-31 14:32 ` [PATCH v5 4/4] powerpc/papr_scm: Implement support for DSM_PAPR_SCM_HEALTH Vaibhav Jain
2020-04-01 5:32 ` Aneesh Kumar K.V
2020-04-03 18:41 ` Dan Williams
2020-04-20 7:14 ` Vaibhav Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2rdsauk.fsf@mpe.ellerman.id.au \
--to=ellerman@au1$(echo .)ibm.com \
--cc=alastair@linux$(echo .)ibm.com \
--cc=aneesh.kumar@linux$(echo .)ibm.com \
--cc=dan.j.williams@intel$(echo .)com \
--cc=jmoyer@redhat$(echo .)com \
--cc=linux-nvdimm@lists$(echo .)01.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=oohall@gmail$(echo .)com \
--cc=vaibhav@linux$(echo .)ibm.com \
--cc=vajain21@vajain21$(echo .)in.ibm.com.in.ibm.com \
--cc=vishal.l.verma@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox