linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Krzysztof Wilczyński" <kw@linux.com>
To: Stuart Hayes <stuart.w.hayes@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org
Subject: Re: [PATCH v2] Expose PCIe SSD Status LED Management DSM in sysfs
Date: Sun, 15 Nov 2020 07:38:54 +0100	[thread overview]
Message-ID: <X7DM/hTfyYdw2jlO@rocinante> (raw)
In-Reply-To: <20201110153735.58587-1-stuart.w.hayes@gmail.com>

Hi Stuart,

On 20-11-10 09:37:35, Stuart Hayes wrote:

[...]
> +
> +	scnprintf(buf, PAGE_SIZE, "%#x\n", dsm_output->state);
> +
> +	ACPI_FREE(out_obj);
> +
> +	return strlen(buf) > 0 ? strlen(buf) : -EIO;

Question to you - since scnprintf() returns the number of characters
written into a buffer, maybe it be possible to use this return value
instead of using strlen(), what do you think?

Krzysztof

      parent reply	other threads:[~2020-11-15  6:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 15:37 [PATCH v2] Expose PCIe SSD Status LED Management DSM in sysfs Stuart Hayes
2020-11-11  7:05 ` Christoph Hellwig
2020-11-12  4:48   ` Stuart Hayes
2020-11-13 14:14 ` Dan Carpenter
2020-11-13 21:38 ` Bjorn Helgaas
2020-11-13 23:19   ` Greg Kroah-Hartman
2020-11-16 22:25     ` Stuart Hayes
2020-11-17  7:07       ` Greg Kroah-Hartman
2020-11-15  6:38 ` Krzysztof Wilczyński [this message]

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=X7DM/hTfyYdw2jlO@rocinante \
    --to=kw@linux.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=stuart.w.hayes@gmail.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;
as well as URLs for NNTP newsgroup(s).