From: Toshi Kani <toshi.kani@hp.com>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: dan.j.williams@intel.com, rafael.j.wysocki@intel.com,
linux-nvdimm@lists.01.org, robert.moore@intel.com,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/2]: nfit: Clarify memory device state flags strings
Date: Thu, 27 Aug 2015 08:18:39 -0600 [thread overview]
Message-ID: <1440685119.14237.83.camel@hp.com> (raw)
In-Reply-To: <20150827030740.GB4438@linux.intel.com>
On Wed, 2015-08-26 at 21:07 -0600, Ross Zwisler wrote:
> On Wed, Aug 26, 2015 at 10:20:23AM -0600, Toshi Kani wrote:
> > diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> > index c3fe206..6993ff2 100644
> > --- a/drivers/acpi/nfit.c
> > +++ b/drivers/acpi/nfit.c
> > @@ -701,12 +701,13 @@ static ssize_t flags_show(struct device *dev,
> > {
> > u16 flags = to_nfit_memdev(dev)->flags;
> >
> > - return sprintf(buf, "%s%s%s%s%s\n",
> > - flags & ACPI_NFIT_MEM_SAVE_FAILED ? "save " :
> > "",
> > - flags & ACPI_NFIT_MEM_RESTORE_FAILED ? "restore
> > " : "",
> > - flags & ACPI_NFIT_MEM_FLUSH_FAILED ? "flush " :
> > "",
> > - flags & ACPI_NFIT_MEM_ARMED ? "arm " : "",
> > - flags & ACPI_NFIT_MEM_HEALTH_OBSERVED ? "smart
> > " : "");
> > + return sprintf(buf, "%s%s%s%s%s%s\n",
> > + flags & ACPI_NFIT_MEM_SAVE_FAILED ? "save_fail " : "",
> > + flags & ACPI_NFIT_MEM_RESTORE_FAILED ? "restore_fail "
> > : "",
> > + flags & ACPI_NFIT_MEM_FLUSH_FAILED ? "flush_fail " :
> > "",
> > + flags & ACPI_NFIT_MEM_ARMED ? "not_arm " : "",
>
> Assuming we do want to update these strings to be more friendly,
> "not_armed" probably makes more sense than "not_arm". Also applies to the
> 2nd hunk below.
Agreed. (Will update if this patch gets ever resurrected. :-)
> > + flags & ACPI_NFIT_MEM_HEALTH_OBSERVED ? "smart_event " > > : "",
> > + flags & ACPI_NFIT_MEM_HEALTH_ENABLED ? "notify_enabled
> > " : "");
> > }
> > static DEVICE_ATTR_RO(flags);
> >
> > @@ -834,11 +835,11 @@ static int acpi_nfit_register_dimms(struct
> > acpi_nfit_desc *acpi_desc)
> > continue;
> >
> > dev_info(acpi_desc->dev, "%s: failed: %s%s%s%s\n",
> > - nvdimm_name(nvdimm),
> > - mem_flags & ACPI_NFIT_MEM_SAVE_FAILED ? "save "
> > : "",
> > - mem_flags & ACPI_NFIT_MEM_RESTORE_FAILED ?
> > "restore " : "",
> > - mem_flags & ACPI_NFIT_MEM_FLUSH_FAILED ? "flush
> > " : "",
> > - mem_flags & ACPI_NFIT_MEM_ARMED ? "arm " : "");
> > + nvdimm_name(nvdimm),
> > + mem_flags & ACPI_NFIT_MEM_SAVE_FAILED ? "save_fail "
> > : "",
> > + mem_flags & ACPI_NFIT_MEM_RESTORE_FAILED ?
> > "restore_fail ":"",
> > + mem_flags & ACPI_NFIT_MEM_FLUSH_FAILED ? "flush_fail
> > " : "",
> > + mem_flags & ACPI_NFIT_MEM_ARMED ? "not_arm " : "");
>
> While you're in here, is there a reason not to include the last two flags
> (smart_event and notify_enabled) in this dev_info() output?
This dev_info() logs any failure in NVDIMM, and the last two flags are not
failure conditions.
Thanks,
-Toshi
WARNING: multiple messages have this Message-ID (diff)
From: Toshi Kani <toshi.kani@hp.com>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: dan.j.williams@intel.com, rafael.j.wysocki@intel.com,
linux-nvdimm@ml01.01.org, robert.moore@intel.com,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/2]: nfit: Clarify memory device state flags strings
Date: Thu, 27 Aug 2015 08:18:39 -0600 [thread overview]
Message-ID: <1440685119.14237.83.camel@hp.com> (raw)
In-Reply-To: <20150827030740.GB4438@linux.intel.com>
On Wed, 2015-08-26 at 21:07 -0600, Ross Zwisler wrote:
> On Wed, Aug 26, 2015 at 10:20:23AM -0600, Toshi Kani wrote:
> > diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> > index c3fe206..6993ff2 100644
> > --- a/drivers/acpi/nfit.c
> > +++ b/drivers/acpi/nfit.c
> > @@ -701,12 +701,13 @@ static ssize_t flags_show(struct device *dev,
> > {
> > u16 flags = to_nfit_memdev(dev)->flags;
> >
> > - return sprintf(buf, "%s%s%s%s%s\n",
> > - flags & ACPI_NFIT_MEM_SAVE_FAILED ? "save " :
> > "",
> > - flags & ACPI_NFIT_MEM_RESTORE_FAILED ? "restore
> > " : "",
> > - flags & ACPI_NFIT_MEM_FLUSH_FAILED ? "flush " :
> > "",
> > - flags & ACPI_NFIT_MEM_ARMED ? "arm " : "",
> > - flags & ACPI_NFIT_MEM_HEALTH_OBSERVED ? "smart
> > " : "");
> > + return sprintf(buf, "%s%s%s%s%s%s\n",
> > + flags & ACPI_NFIT_MEM_SAVE_FAILED ? "save_fail " : "",
> > + flags & ACPI_NFIT_MEM_RESTORE_FAILED ? "restore_fail "
> > : "",
> > + flags & ACPI_NFIT_MEM_FLUSH_FAILED ? "flush_fail " :
> > "",
> > + flags & ACPI_NFIT_MEM_ARMED ? "not_arm " : "",
>
> Assuming we do want to update these strings to be more friendly,
> "not_armed" probably makes more sense than "not_arm". Also applies to the
> 2nd hunk below.
Agreed. (Will update if this patch gets ever resurrected. :-)
> > + flags & ACPI_NFIT_MEM_HEALTH_OBSERVED ? "smart_event " > > : "",
> > + flags & ACPI_NFIT_MEM_HEALTH_ENABLED ? "notify_enabled
> > " : "");
> > }
> > static DEVICE_ATTR_RO(flags);
> >
> > @@ -834,11 +835,11 @@ static int acpi_nfit_register_dimms(struct
> > acpi_nfit_desc *acpi_desc)
> > continue;
> >
> > dev_info(acpi_desc->dev, "%s: failed: %s%s%s%s\n",
> > - nvdimm_name(nvdimm),
> > - mem_flags & ACPI_NFIT_MEM_SAVE_FAILED ? "save "
> > : "",
> > - mem_flags & ACPI_NFIT_MEM_RESTORE_FAILED ?
> > "restore " : "",
> > - mem_flags & ACPI_NFIT_MEM_FLUSH_FAILED ? "flush
> > " : "",
> > - mem_flags & ACPI_NFIT_MEM_ARMED ? "arm " : "");
> > + nvdimm_name(nvdimm),
> > + mem_flags & ACPI_NFIT_MEM_SAVE_FAILED ? "save_fail "
> > : "",
> > + mem_flags & ACPI_NFIT_MEM_RESTORE_FAILED ?
> > "restore_fail ":"",
> > + mem_flags & ACPI_NFIT_MEM_FLUSH_FAILED ? "flush_fail
> > " : "",
> > + mem_flags & ACPI_NFIT_MEM_ARMED ? "not_arm " : "");
>
> While you're in here, is there a reason not to include the last two flags
> (smart_event and notify_enabled) in this dev_info() output?
This dev_info() logs any failure in NVDIMM, and the last two flags are not
failure conditions.
Thanks,
-Toshi
next prev parent reply other threads:[~2015-08-27 14:18 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 16:20 [PATCH 0/2]: acpi, nfit: Clarify memory device state flags Toshi Kani
2015-08-26 16:20 ` Toshi Kani
2015-08-26 16:20 ` [PATCH 1/2]: nfit: Clarify memory device state flags strings Toshi Kani
2015-08-26 16:20 ` Toshi Kani
2015-08-27 3:07 ` Ross Zwisler
2015-08-27 3:07 ` Ross Zwisler
2015-08-27 14:18 ` Toshi Kani [this message]
2015-08-27 14:18 ` Toshi Kani
2015-08-27 18:57 ` Dan Williams
2015-08-27 18:57 ` Dan Williams
2015-08-27 19:02 ` Toshi Kani
2015-08-27 19:02 ` Toshi Kani
2015-08-26 16:20 ` [PATCH 2/2]: acpica/nfit: Rename not-armed bit definition Toshi Kani
2015-08-26 16:20 ` Toshi Kani
2015-08-26 17:16 ` Dan Williams
2015-08-26 17:16 ` Dan Williams
2015-08-26 19:59 ` Linda Knippers
2015-08-26 19:59 ` Linda Knippers
2015-08-26 21:12 ` Toshi Kani
2015-08-26 21:12 ` Toshi Kani
2015-08-26 21:30 ` Dan Williams
2015-08-26 21:30 ` Dan Williams
2015-08-26 21:44 ` Toshi Kani
2015-08-26 21:44 ` Toshi Kani
2015-08-26 22:00 ` Dan Williams
2015-08-26 22:00 ` Dan Williams
2015-08-27 14:43 ` Linda Knippers
2015-08-27 14:43 ` Linda Knippers
2015-08-27 15:30 ` Dan Williams
2015-08-27 15:30 ` Dan Williams
2015-08-27 15:35 ` Linda Knippers
2015-08-27 15:35 ` Linda Knippers
2015-08-27 15:54 ` Dan Williams
2015-08-27 15:54 ` Dan Williams
2015-08-27 16:32 ` Linda Knippers
2015-08-27 16:32 ` Linda Knippers
2015-08-27 17:04 ` Dan Williams
2015-08-27 17:04 ` Dan Williams
2015-08-27 17:09 ` Linda Knippers
2015-08-27 17:09 ` Linda Knippers
2015-08-26 23:16 ` Rafael J. Wysocki
2015-08-26 23:16 ` Rafael J. Wysocki
2015-08-26 23:29 ` Toshi Kani
2015-08-26 23:29 ` Toshi Kani
2015-08-26 23:35 ` Toshi Kani
2015-08-26 23:35 ` Toshi Kani
2015-08-27 1:56 ` Moore, Robert
2015-08-27 1:56 ` Moore, Robert
2015-08-27 14:32 ` Toshi Kani
2015-08-27 14:32 ` Toshi Kani
2015-08-27 14:32 ` Toshi Kani
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=1440685119.14237.83.camel@hp.com \
--to=toshi.kani@hp.com \
--cc=dan.j.williams@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=rafael.j.wysocki@intel.com \
--cc=robert.moore@intel.com \
--cc=ross.zwisler@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.