From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC23DC43381 for ; Thu, 28 Feb 2019 00:47:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 76C66218A5 for ; Thu, 28 Feb 2019 00:47:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PJWIR/wx"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FpdFsSOR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76C66218A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TFXyjWSna3T3EPdSRUdrVZa/G05VumdwW87jCUTwSsQ=; b=PJWIR/wxfXkz1I WsOVFiD72ErrX0OnkzZog3+RP6zaxP4QscZDiDS/87tlkvY4j/iDgMIImoHOi08TJ67iOIzLQCLwm 8YpLssITFARy+BpRpo3aUH0uFmwFAdM2jfuL/uMWMqOOiF9pTpa+HmHYtDrmzZHs2BrV/evHhS8sq 0Op9pjiRbXmTrJxQ0bD7o1Fj6KjGTxRMtJz1adiWNb3P9yRESqHg7rJE/dNDqi2vbGhchqpTFaAws EaB+Sh3rVKJ4K8Tca+4Jy704EAw1/TSYzak0aewkmwSGX58D1b5GE4T+d8pSy3zoL7IlLjtSgsnTb XASc7OLAG+BxiCKPpnVA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gz9rf-0001kn-7n; Thu, 28 Feb 2019 00:47:55 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gz9rb-0001kD-JE for linux-arm-kernel@lists.infradead.org; Thu, 28 Feb 2019 00:47:53 +0000 Received: by mail-pg1-x544.google.com with SMTP id l11so8784226pgq.10 for ; Wed, 27 Feb 2019 16:47:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=H3hXfDj0PXBoFA9cGgNBp7TmibItk5rJ8IiapF7qRlI=; b=FpdFsSORXTE5ALYt/FEXzffH7PDPJuT7po/2MhlkDBB//oLyzu6aeKWhqQ+awdLqqX t1arCbISgUK0YFJNR0PODGctCHdIuymlgyOCnBhLZzGYBN59S9wB+B8VvY2xYBlIkUQe /RqKqh6T3GMhyrum2Ugp5n+ZYzx3/0Dd1CgZP50Dfea7Xd/gBisQO5IfEtMz9hX+hiyk HaGA93icCJAbnMJZtFI1yIgX2y0CmFIF2SBmhyM+xJdU/4IV7FJoaq+irIe4vREsiits 5cXr/aP6Rk6Ju20tyG2SWhaUD6ExAjM4lgFl9HueMix4rPE3hIZIfTOZbl3N/glgaXW4 V8lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=H3hXfDj0PXBoFA9cGgNBp7TmibItk5rJ8IiapF7qRlI=; b=S057dYEJgRW92upe0TAC3xPiSUtLjCFznCuHvwCHxfZJoyjnEF9qqp0kNwnSqQcani TERVz6qbly341RhL+NezuotOqBLlkWHi6vf404r7fsH9wHur5skJPzGjIjkh/IcxtzXb GgfsnCVzHznN7eX/QFBBOdbjTk/JYBM+8w9sMLrnaYV+C7ODvjEqVgy0RKDmzz7qjS0l sDjURQ2NGdOVVXxBz29MKTrGJzFRncrgl7yDDYLr7S8gVneHzbrWKMGhYttrXmerBeSZ q2kW2t9L3qqUdUf+TXFr59PAID2LEIRPp6imncJhkeg6SnBs4duYxcTAjUMVjepHDKNo LOSA== X-Gm-Message-State: AHQUAubHLPZGH5ldrT93M5Ckpb0TJl6yXlOTfPISNtTfxvGjbEDyxtN4 reEBnmlMhfz/t4qbjISAubLJ+egCFyA= X-Google-Smtp-Source: AHgI3IZhh1JFXZBlrrbqGTkMOIDkp0jCdJZyTpl42phRKA6pJQ3SiAvO0ijYaGWfFyh8Rvp5uGiN2g== X-Received: by 2002:a65:51c3:: with SMTP id i3mr5670927pgq.45.1551314870020; Wed, 27 Feb 2019 16:47:50 -0800 (PST) Received: from bobby.localdomain ([2601:1c0:5501:37e2::87c4]) by smtp.gmail.com with ESMTPSA id a24sm21150495pfo.160.2019.02.27.16.47.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Feb 2019 16:47:49 -0800 (PST) Date: Wed, 27 Feb 2019 16:48:00 -0800 From: Robert Eshleman To: Robert Eshleman Subject: Re: [PATCH 7/8] net: seeq: replace kmalloc / memset(,0) with kzalloc Message-ID: <20190228004800.GA26378@bobby.localdomain> References: <5ff7bcf7b8db8daa129703e5f7b632825f25c766.1551246708.git.bobbyeshleman@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5ff7bcf7b8db8daa129703e5f7b632825f25c766.1551246708.git.bobbyeshleman@gmail.com> User-Agent: Mutt/1.11.2 (2019-01-07) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190227_164752_451935_0D40E595 X-CRM114-Status: GOOD ( 18.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Russell King , linux-kernel@vger.kernel.org, "David S. Miller" , linux-arm-kernel@lists.infradead.org, Tariq Toukan Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 26, 2019 at 10:09:54PM -0800, Robert Eshleman wrote: > 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); Byte is not zero, so the intent of this patch does not apply here. Dropping this from the patch set in v2. > 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