From: hanyu001@208suo.com
To: jejb@linux.ibm.com, martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Fwd: [PATCH] scsi: Convert snprintf to scnprintf
Date: Mon, 17 Jul 2023 11:03:26 +0800 [thread overview]
Message-ID: <7309ee79c3aa243c0b448746c76f1d9e@208suo.com> (raw)
In-Reply-To: <tencent_3FC1F30F01ADEAF1CAC67170222ADA97DA07@qq.com>
Fix the coccicheck warnings:
./drivers/scsi/pmcraid.c:3591:8-16: WARNING: use scnprintf or sprintf
./drivers/scsi/pmcraid.c:3557:8-16: WARNING: use scnprintf or sprintf
./drivers/scsi/pmcraid.c:3496:8-16: WARNING: use scnprintf or sprintf
Signed-off-by: ztt <1549089851@qq.com>
---
drivers/scsi/pmcraid.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 9415a4819470..a65198a48b16 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -3493,7 +3493,7 @@ static ssize_t pmcraid_show_log_level(
struct Scsi_Host *shost = class_to_shost(dev);
struct pmcraid_instance *pinstance =
(struct pmcraid_instance *)shost->hostdata;
- return snprintf(buf, PAGE_SIZE, "%d\n",
pinstance->current_log_level);
+ return scnprintf(buf, PAGE_SIZE, "%d\n",
pinstance->current_log_level);
}
/**
@@ -3554,7 +3554,7 @@ static ssize_t pmcraid_show_drv_version(
char *buf
)
{
- return snprintf(buf, PAGE_SIZE, "version: %s\n",
+ return scnprintf(buf, PAGE_SIZE, "version: %s\n",
PMCRAID_DRIVER_VERSION);
}
@@ -3588,7 +3588,7 @@ static ssize_t pmcraid_show_adapter_id(
pinstance->pdev->devfn;
u32 aen_group = pmcraid_event_family.id;
- return snprintf(buf, PAGE_SIZE,
+ return scnprintf(buf, PAGE_SIZE,
"adapter id: %d\nminor: %d\naen group: %d\n",
adapter_id, MINOR(pinstance->cdev.dev), aen_group);
}
next parent reply other threads:[~2023-07-17 3:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tencent_3FC1F30F01ADEAF1CAC67170222ADA97DA07@qq.com>
2023-07-17 3:03 ` hanyu001 [this message]
[not found] <tencent_D9472259DA98DAF6732781816A8DCAACF107@qq.com>
2023-07-17 2:43 ` hanyu001
[not found] <tencent_1B9669556AF9CF690462AB7F2A47C7378809@qq.com>
2023-07-17 2:32 ` hanyu001
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=7309ee79c3aa243c0b448746c76f1d9e@208suo.com \
--to=hanyu001@208suo.com \
--cc=jejb@linux.ibm.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®