From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Alan Adamson <alan.adamson@oracle.com>
Cc: Chaitanya Kulkarni <chaitanyak@nvidia.com>,
"kbusch@kernel.org" <kbusch@kernel.org>,
"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH V8 1/1] nvme: allow passthru cmd error logging
Date: Tue, 16 Jan 2024 06:33:00 +0000 [thread overview]
Message-ID: <67007392-75a2-4a66-8a80-010fd7fe377f@nvidia.com> (raw)
In-Reply-To: <20240111000855.1800481-2-alan.adamson@oracle.com>
>
> +static ssize_t nvme_passthru_err_log_enabled_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + return sysfs_emit(buf, dev->logging_enabled ? "on" : "off");
> +}
> +
Can we use following on the top of this as most of the XXX_show()
functions in the host/sysfs.c are using "\n" ?
diff --git a/drivers/nvme/host/sysfs.c b/drivers/nvme/host/sysfs.c
index 8215abaa68e5..ce021f4995eb 100644
--- a/drivers/nvme/host/sysfs.c
+++ b/drivers/nvme/host/sysfs.c
@@ -38,7 +38,7 @@ static DEVICE_ATTR(rescan_controller, S_IWUSR, NULL,
nvme_sysfs_rescan);
static ssize_t nvme_passthru_err_log_enabled_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
- return sysfs_emit(buf, dev->logging_enabled ? "on" : "off");
+ return sysfs_emit(buf, dev->logging_enabled ? "on\n" : "off\n");
}
static ssize_t nvme_passthru_err_log_enabled_store(struct device *dev,
-ck
prev parent reply other threads:[~2024-01-16 6:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 0:08 [PATCH V8 0/1] nvme: allow passthru cmd error logging Alan Adamson
2024-01-11 0:08 ` [PATCH V8 1/1] " Alan Adamson
2024-01-11 7:04 ` Christoph Hellwig
2024-01-17 3:46 ` Chaitanya Kulkarni
2024-01-17 14:14 ` Sagi Grimberg
2024-01-18 3:31 ` Chaitanya Kulkarni
2024-01-23 11:33 ` Sagi Grimberg
2024-01-23 17:11 ` alan.adamson
2024-01-24 3:41 ` Chaitanya Kulkarni
2024-01-24 17:10 ` alan.adamson
2024-01-24 9:06 ` Christoph Hellwig
2024-01-24 3:37 ` Chaitanya Kulkarni
2024-01-25 0:52 ` alan.adamson
2024-01-29 10:24 ` Sagi Grimberg
2024-01-16 6:33 ` Chaitanya Kulkarni [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=67007392-75a2-4a66-8a80-010fd7fe377f@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=alan.adamson@oracle.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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