From: Robert Eshleman <bobbyeshleman@gmail.com>
To: bobbyeshleman@gmail.com
Cc: linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
Russell King <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org,
Tariq Toukan <tariqt@mellanox.com>
Subject: [PATCH 7/8] net: seeq: replace kmalloc / memset(,0) with kzalloc
Date: Tue, 26 Feb 2019 22:09:54 -0800 [thread overview]
Message-ID: <5ff7bcf7b8db8daa129703e5f7b632825f25c766.1551246708.git.bobbyeshleman@gmail.com> (raw)
In-Reply-To: <cover.1551246708.git.bobbyeshleman@gmail.com>
This patch reduces a call to memset(,0) by replacing
a kmalloc call with a kzalloc call.
Signed-off-by: Robert Eshleman <bobbyeshleman@gmail.com>
---
drivers/net/ethernet/seeq/ether3.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/seeq/ether3.c b/drivers/net/ethernet/seeq/ether3.c
index d1bb73bf9914..7456cf08a48f 100644
--- a/drivers/net/ethernet/seeq/ether3.c
+++ b/drivers/net/ethernet/seeq/ether3.c
@@ -223,7 +223,7 @@ ether3_addr(char *addr, struct expansion_card *ec)
static int
ether3_ramtest(struct net_device *dev, unsigned char byte)
{
- unsigned char *buffer = kmalloc(RX_END, GFP_KERNEL);
+ unsigned char *buffer = kzalloc(RX_END, GFP_KERNEL);
int i,ret = 0;
int max_errors = 4;
int bad = -1;
@@ -231,7 +231,6 @@ ether3_ramtest(struct net_device *dev, unsigned char byte)
if (!buffer)
return 1;
- memset(buffer, byte, RX_END);
ether3_setbuffer(dev, buffer_write, 0);
ether3_writebuffer(dev, buffer, TX_END);
ether3_setbuffer(dev, buffer_write, RX_START);
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next parent reply other threads:[~2019-02-27 6:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1551246708.git.bobbyeshleman@gmail.com>
2019-02-27 6:09 ` Robert Eshleman [this message]
2019-02-28 0:48 ` [PATCH 7/8] net: seeq: replace kmalloc / memset(,0) with kzalloc Robert Eshleman
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=5ff7bcf7b8db8daa129703e5f7b632825f25c766.1551246708.git.bobbyeshleman@gmail.com \
--to=bobbyeshleman@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.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).