From: Dinh Nguyen <dinguyen@kernel.org>
To: kah.jing.lee@intel.com
Cc: linux-kernel@vger.kernel.org, tien.sung.ang@intel.com
Subject: Re: [PATCH] drivers: firmware: stratix10-rsu: Fix max_retry counter value
Date: Sun, 6 Aug 2023 12:51:53 -0500 [thread overview]
Message-ID: <711f42de-34d8-c27a-e058-5fa460012a69@kernel.org> (raw)
In-Reply-To: <88b79f4cfe1c28e31b902d2f12b81e431b09e125.1691112823.git.kah.jing.lee@intel.com>
On 8/3/23 20:35, kah.jing.lee@intel.com wrote:
> From: Kah Jing Lee <kah.jing.lee@intel.com>
>
> Fix the max_retry value because the value is truncated at scnprintf format
> specifier, with added hex symbol and newline.
>
> Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com>
> ---
> drivers/firmware/stratix10-rsu.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c
> index e51c95f8d445..98ec39f6dae8 100644
> --- a/drivers/firmware/stratix10-rsu.c
> +++ b/drivers/firmware/stratix10-rsu.c
> @@ -405,8 +405,7 @@ static ssize_t max_retry_show(struct device *dev,
> if (!priv)
> return -ENODEV;
>
> - return scnprintf(buf, sizeof(priv->max_retry),
> - "0x%08x\n", priv->max_retry);
> + return scnprintf(buf, PAGE_SIZE, "0x%08x\n", priv->max_retry);
> }
>
This would be a good time to switch over to use sysfs_emit()
Dinh
next prev parent reply other threads:[~2023-08-06 17:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 1:35 kah.jing.lee
2023-08-06 17:51 ` Dinh Nguyen [this message]
2023-08-18 1:56 ` Lee, Kah Jing
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=711f42de-34d8-c27a-e058-5fa460012a69@kernel.org \
--to=dinguyen@kernel.org \
--cc=kah.jing.lee@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tien.sung.ang@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®