From: Li Heng <liheng40@huawei.com>
To: <martin.petersen@oracle.com>, <jejb@linux.ibm.com>
Cc: <MPT-FusionLinux.pdl@broadcom.com>, <linux-scsi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH -next 1/3] scsi: Remove superfluous memset()
Date: Thu, 30 Jul 2020 11:31:56 +0800 [thread overview]
Message-ID: <1596079918-41115-2-git-send-email-liheng40@huawei.com> (raw)
In-Reply-To: <1596079918-41115-1-git-send-email-liheng40@huawei.com>
Fixes coccicheck warning:
./drivers/scsi/pmcraid.c:4709:3-21: WARNING: dma_alloc_coherent use in pinstance -> hrrq_start [ i ] already zeroes out memory, so memset is not needed
dma_alloc_coherent use in status already zeroes out memory, so memset is not needed
Signed-off-by: Li Heng <liheng40@huawei.com>
---
drivers/scsi/pmcraid.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index aa9ae2a..d99568f 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -4716,7 +4716,6 @@ static int pmcraid_allocate_host_rrqs(struct pmcraid_instance *pinstance)
return -ENOMEM;
}
- memset(pinstance->hrrq_start[i], 0, buffer_size);
pinstance->hrrq_curr[i] = pinstance->hrrq_start[i];
pinstance->hrrq_end[i] =
pinstance->hrrq_start[i] + PMCRAID_MAX_CMD - 1;
--
2.7.4
next prev parent reply other threads:[~2020-07-30 3:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 3:31 [PATCH -next 0/3] scsi: Remove superfluous memset() Li Heng
2020-07-30 3:31 ` Li Heng [this message]
2020-07-30 3:31 ` [PATCH -next 2/3] " Li Heng
2020-07-30 3:31 ` [PATCH -next 3/3] " Li Heng
2020-09-09 2:17 ` [PATCH -next 0/3] " 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=1596079918-41115-2-git-send-email-liheng40@huawei.com \
--to=liheng40@huawei.com \
--cc=MPT-FusionLinux.pdl@broadcom.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;
as well as URLs for NNTP newsgroup(s).