Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1427764img; Tue, 26 Feb 2019 22:11:36 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia0M3u2gJeDAYf9PcHiAtSh9OtXy0pBK4M3gCUQlc4hfHYD9d7aWQ3JAu1TY60Cvv4kle7j X-Received: by 2002:a63:74e:: with SMTP id 75mr1402471pgh.374.1551247896024; Tue, 26 Feb 2019 22:11:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551247896; cv=none; d=google.com; s=arc-20160816; b=pvtCZUvJXyYuqo01wOQ9SbN0lKG8d10/dPAX3zDscXHb0W4poaUrI1U4qBdDE+dXQa cCc8cbtssp7ZZbUTtshcH+q69JzWV0x2yuVoobWI7Y/xdt2RLqr3997JrBkHHAJGSKfI fkBJOc1TLHPgSe6HD34y1LyXAsRYuWN3bKyBcySr60DmUGaYhoXKQD9p7Z172fpk19sa JXCtoPyHh6k4OaumEIS5Xqv9dlsp52qESrQeMv4xTnjE6hbKX2GhHcyL8wf0xG6vvCux wl7ETAq7drfabp0d3GT8ocfp8tgdwNjZkiiIjs8UFR+9cCiesZJnilGRZrsiu4Rm5IrJ wfkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mIBepAg0Yk/poa+mjvFR+U3FDg4po3CMCiCfsEn4UYI=; b=X6wZ6A/95v7DVMcdlGt9yBRiCjpkmLFe2le5r/foht6TqLESOqtv6RarQpYJ8cwhAN G0yGHxeNWWWefDugJhC0DPZeHqA0no22gvlkzhuiFbGJA6CdcSDdHKf1QENWl1yfYRPx OLkx1JqPIIdT0Uafb85iVa8lFSFLhIk+X5aX6HTTvqJMDxULYxJp+pHlRh0nsXEj3APj cphVzce/8M3oRIEpt3XV3f0upH7judZEU+6WcC9XcOxI+V9z6oUJ+rJP1mwe/Ec1ae9r Ig0tr+CFVbZV+cJLlzb7k4m66MylafktrgwMhQQ0VChImYxrC7LlPZYrIrFQuwRIR1ZS YlzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RKr02Ymg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si14880415pfi.269.2019.02.26.22.11.21; Tue, 26 Feb 2019 22:11:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RKr02Ymg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730021AbfB0GKH (ORCPT + 99 others); Wed, 27 Feb 2019 01:10:07 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:41372 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbfB0GKF (ORCPT ); Wed, 27 Feb 2019 01:10:05 -0500 Received: by mail-pl1-f195.google.com with SMTP id y5so7461410plk.8; Tue, 26 Feb 2019 22:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mIBepAg0Yk/poa+mjvFR+U3FDg4po3CMCiCfsEn4UYI=; b=RKr02YmgXOuIxHVrrzJbGyjkSMPnLEMsm7plcDw1yO+dldAY2tbWbR7MkyIUIL6RDq FS2HoMwv9aHAiTjyjUtLhRzgl61ww8Iy22eVsuvawyqnfHKuXngjN1cRfEu1cT7qPf2g F/QuWg+ZDHWzrIxX3mGS0MFBvaopIAj2VHHWjZOhC+8bsnM/TDXSDpLLNdhsi1CiN+1C SLWUQbTLhkfUI0l9J2Ju/X0HZ8Ma86h87OdNdmUx72mJrA/AL+er1qleUY9DGlht8+R+ dZi6azoTUUmHY9T4VjeVIRzV+h81sMzmYjKoN6jYT3fi8OM6AW697c7LfqBHk1B1uoRJ 91Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mIBepAg0Yk/poa+mjvFR+U3FDg4po3CMCiCfsEn4UYI=; b=DyHb3LsckhwwKzfVMFjUjfZHsTBYC03dP4rZwZIDhYL+MpgXXRnBfUixYqT6Hg/VjA e1OUpnczrgh5A0y2VpRuA1/JO07xTburXvASPpxHZVOlt4NqoPOxni/q+D3PlPYCtBBV EMPGnu3XrIb+HvfGSgPnAezcH1wv+TuEZ7IoyDpkwmuyc0zzTcctWuQ0KLa8i4y5zPSc tMatKfdXNl83MwCw59MIQk1T0PLHgHhI/yS3pAgPfJ1EkwyMPxxmcfTZfw3ni0t5IAdI AvzFAhPg094VEzvuOzJeVUzp/Mi0j5CMfugzj+x9EFD+5OyTz8pzGUcJIi+J0PEm+8wd 7WzA== X-Gm-Message-State: AHQUAuYHdSQAXreDzakrbKk/vZchK3zUNx8Q0iE/feCwQN+ywnfIShqy ZMUH6lfNFN5CqflOutnhPTo= X-Received: by 2002:a17:902:2a89:: with SMTP id j9mr493155plb.28.1551247804713; Tue, 26 Feb 2019 22:10:04 -0800 (PST) Received: from bobby.hsd1.or.comcast.net ([2601:1c0:5501:37e2::87c4]) by smtp.googlemail.com with ESMTPSA id d5sm20733473pfo.83.2019.02.26.22.10.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Feb 2019 22:10:04 -0800 (PST) From: Robert Eshleman To: bobbyeshleman@gmail.com Cc: Tariq Toukan , "David S. Miller" , Russell King , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/8] net: seeq: replace kmalloc / memset(,0) with kzalloc Date: Tue, 26 Feb 2019 22:09:54 -0800 Message-Id: <5ff7bcf7b8db8daa129703e5f7b632825f25c766.1551246708.git.bobbyeshleman@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch reduces a call to memset(,0) by replacing a kmalloc call with a kzalloc call. Signed-off-by: Robert Eshleman --- 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