Linux-NVDIMM Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vaibhav Jain <vaibhav@linux.ibm.com>
To: "Verma\, Vishal L" <vishal.l.verma@intel.com>,
	"linux-nvdimm\@lists.01.org" <linux-nvdimm@lists.01.org>
Cc: "aneesh.kumar@linux.ibm.com" <aneesh.kumar@linux.ibm.com>
Subject: Re: [ndctl PATCH v6 1/5] libndctl: Refactor out add_dimm() to handle NFIT specific init
Date: Wed, 17 Jun 2020 22:11:34 +0530	[thread overview]
Message-ID: <878sglprup.fsf@linux.ibm.com> (raw)
In-Reply-To: <77ef7c2fcbb084d7261e9e2595c57a03bc234ef7.camel@intel.com>

Hi Vishal,

Thanks for reviewing this patch. I will be addressing your review
comments in v7 of this patch series.

~ Vaibhav

"Verma, Vishal L" <vishal.l.verma@intel.com> writes:

> On Tue, 2020-06-16 at 11:00 +0530, Vaibhav Jain wrote:
>> Presently add_dimm() only probes dimms that support NFIT/ACPI. Hence
>
> "...probes NVDIMMs for platforms that support the ACPI NFIT"
>
> The NFIT is a platform firmware thing, not directly related to the DIMMs
> themselves.
>
>> this patch refactors this functionality into two functions namely
>
> s/Hence this patch refactors/Refactor/
>
>> add_dimm() and add_nfit_dimm(). Function add_dimm() performs
>> allocation and common 'struct ndctl_dimm' initialization and depending
>> on whether the dimm-bus supports NIFT, calls add_nfit_dimm(). Once
>> the probe is completed based on the value of 'ndctl_dimm.cmd_family'
>> appropriate dimm-ops are assigned to the dimm.
>> 
>> In case dimm-bus is of unknown type or doesn't support NFIT the
>> initialization still continues, with no dimm-ops assigned to the
>> 'struct ndctl_dimm' there-by limiting the functionality available.
>
> No need to hyphenate 'thereby'
>
>> 
>> This patch shouldn't introduce any behavioral change.
>> 
>> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
>> ---
>> Changelog:
>> 
>> v5..v6:
>> * Changed a return code for add_nfit_dimm() in case a allocation
>>   failed. [ Vishal ]
>> * Updated an error message in error path of add_dimm() [ Vishal ]
>> 
>> v4..v5:
>> * None
>> 
>> v3..v4:
>> * None
>> 
>> v2..v3:
>> * None
>> 
>> v1..v2:
>> * None
>> ---
>>  ndctl/lib/libndctl.c | 196 +++++++++++++++++++++++++------------------
>>  1 file changed, 115 insertions(+), 81 deletions(-)
>> 
> [..]
>
>> +
>> +	/* Assign dimm-ops based on command family */
>> +	if (dimm->cmd_family == NVDIMM_FAMILY_INTEL)
>> +		dimm->ops = intel_dimm_ops;
>> +	if (dimm->cmd_family == NVDIMM_FAMILY_HPE1)
>> +		dimm->ops = hpe1_dimm_ops;
>> +	if (dimm->cmd_family == NVDIMM_FAMILY_MSFT)
>> +		dimm->ops = msft_dimm_ops;
>> +	if (dimm->cmd_family == NVDIMM_FAMILY_HYPERV)
>> +		dimm->ops = hyperv_dimm_ops;
>>   out:
>> +	if (rc) {
>> +		/* Ensure dimm_uninit() is not called during free_dimm() */
>> +		dimm->ops = NULL;
>
> I think the above assignment and comment are now stale..
>
>> +		err(ctx, "%s: probe failed: %s\n", ndctl_dimm_get_devname(dimm),
>> +		    strerror(-rc));
>> +		goto err_read;
>> +	}
>> +
>>  	list_add(&bus->dimms, &dimm->list);
>>  	free(path);
>>  

-- 
Cheers
~ Vaibhav
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

  reply	other threads:[~2020-06-17 16:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16  5:30 [ndctl PATCH v6 0/5] Add support for reporting papr nvdimm health Vaibhav Jain
2020-06-16  5:30 ` [ndctl PATCH v6 1/5] libndctl: Refactor out add_dimm() to handle NFIT specific init Vaibhav Jain
2020-06-17  0:35   ` Verma, Vishal L
2020-06-17 16:41     ` Vaibhav Jain [this message]
2020-06-16  5:30 ` [ndctl PATCH v6 2/5] libncdtl: Add initial support for NVDIMM_FAMILY_PAPR nvdimm family Vaibhav Jain
2020-06-17  1:02   ` Verma, Vishal L
2020-06-17 16:42     ` Vaibhav Jain
2020-06-18  0:11       ` Verma, Vishal L
2020-06-16  5:30 ` [ndctl PATCH v6 3/5] libndctl,papr_scm: Add definitions for PAPR nvdimm specific methods Vaibhav Jain
2020-06-16  5:30 ` [ndctl PATCH v6 4/5] papr: Add scaffolding to issue and handle PDSM requests Vaibhav Jain
2020-06-16  5:30 ` [ndctl PATCH v6 5/5] libndctl,papr_scm: Implement support for PAPR_PDSM_HEALTH 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=878sglprup.fsf@linux.ibm.com \
    --to=vaibhav@linux.ibm.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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