From: Wei Yongjun <weiyongjun1@huawei.com>
To: Ioana Radulescu <ruxandra.radulescu@nxp.com>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
<linux-kernel@vger.kernel.org>, <devel@driverdev.osuosl.org>,
<kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] staging: fsl-dpaa2/ethsw: Remove useless set memory to zero use memset()
Date: Fri, 2 Aug 2019 01:31:49 +0000 [thread overview]
Message-ID: <20190802013149.80952-1-weiyongjun1@huawei.com> (raw)
The memory return by kzalloc() has already be set to zero, so remove
useless memset(0).
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
index 4b94a01513a7..aac98ece2335 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
@@ -641,8 +641,6 @@ static int port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
if (!dma_mem)
return -ENOMEM;
- memset(dma_mem, 0, fdb_dump_size);
-
fdb_dump_iova = dma_map_single(dev, dma_mem, fdb_dump_size,
DMA_FROM_DEVICE);
if (dma_mapping_error(dev, fdb_dump_iova)) {
reply other threads:[~2019-08-02 1:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190802013149.80952-1-weiyongjun1@huawei.com \
--to=weiyongjun1@huawei.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=ioana.ciornei@nxp.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ruxandra.radulescu@nxp.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).