From: Avri Altman <Avri.Altman@wdc.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>
Cc: "jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] scsi: ufs: convert sysfs sprintf/snprintf family to sysfs_emit
Date: Tue, 2 Mar 2021 07:04:05 +0000 [thread overview]
Message-ID: <DM6PR04MB65758DF8DCE75B782D0A10F0FC999@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <1614665298-115183-1-git-send-email-jiapeng.chong@linux.alibaba.com>
> Fix the following coccicheck warning:
>
> ./drivers/scsi/ufs/ufshcd.c:1538:8-16: WARNING: use scnprintf or
> sprintf.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
> ---
> drivers/scsi/ufs/ufshcd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 7716175..7fb94d7 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -1535,7 +1535,7 @@ static ssize_t ufshcd_clkscale_enable_show(struct
> device *dev,
> {
> struct ufs_hba *hba = dev_get_drvdata(dev);
>
> - return snprintf(buf, PAGE_SIZE, "%d\n", hba->clk_scaling.is_enabled);
> + return sysfs_emit(buf, "%d\n", hba->clk_scaling.is_enabled);
> }
>
> static ssize_t ufshcd_clkscale_enable_store(struct device *dev,
> --
> 1.8.3.1
next prev parent reply other threads:[~2021-03-02 8:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 6:08 Jiapeng Chong
2021-03-02 7:04 ` Avri Altman [this message]
2021-03-04 4:16 ` Martin K. Petersen
-- strict thread matches above, loose matches on Subject: below --
2021-02-03 7:39 Jiapeng Chong
2021-02-03 7:49 ` Avri Altman
2021-02-09 3:12 ` Martin K. Petersen
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=DM6PR04MB65758DF8DCE75B782D0A10F0FC999@DM6PR04MB6575.namprd04.prod.outlook.com \
--to=avri.altman@wdc.com \
--cc=alim.akhtar@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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®