From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
To: Atharv Dubey <atharvd440@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>, <qat-linux@intel.com>,
<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] crypto: qat - replace scnprintf() with sysfs_emit()
Date: Tue, 24 Mar 2026 12:34:14 +0000 [thread overview]
Message-ID: <acKExvXz111N1zNt@gcabiddu-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <20260321-sysfs-v2-1-27ad91b89910@gmail.com>
On Sat, Mar 21, 2026 at 10:17:45AM +0530, Atharv Dubey wrote:
> Replace 3 sysfs functions in the Intel Qat Driver
> to use sysfs_emit() instead of scnprintf().
>
> - erros_correctable_show(): Replace scnprint() with sysfs_emit()
/s/erros/errors
/s/scnprint/scnprintf/g
> - errors_nonfatal_show(): Replace scnprint() with sysfs_emit()
> - errors_fatal_show(): Replace scnprint() with sysfs_emit()
...
> static ssize_t errors_fatal_show(struct device *dev,
> @@ -50,7 +50,7 @@ static ssize_t errors_fatal_show(struct device *dev,
> return -EINVAL;
>
> counter = ADF_RAS_ERR_CTR_READ(accel_dev->ras_errors, ADF_RAS_FATAL);
> - return scnprintf(buf, PAGE_SIZE, "%ld\n", counter);
> + return sysfs_emit(buf, "%ld\n", counter);
Remove spurious double space after "buf,".
Anyway, I just noticed that counter is declared as `unsigned long` and
scnprintf() is using %d.
As ADF_RAS_ERR_CTR_READ() expands to atomic_read() which returns an int,
I'm going to convert `unsigned long counter` in an interger.
I'm going to send a fix for the above and your patch on top (with fixes)
in a small series. No action required for you. :-)
Thanks,
--
Giovanni
prev parent reply other threads:[~2026-03-24 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 4:47 Atharv Dubey
2026-03-24 12:34 ` Giovanni Cabiddu [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=acKExvXz111N1zNt@gcabiddu-mobl.ger.corp.intel.com \
--to=giovanni.cabiddu@intel.com \
--cc=atharvd440@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qat-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®