Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1427395img; Tue, 26 Feb 2019 22:11:02 -0800 (PST) X-Google-Smtp-Source: AHgI3IY26BxRF7FTk3cXyiCNsSAVSMHbPqe9mtgrV0UNxJBtEr0BpxrSByDRTp/gxDy26yoaJrra X-Received: by 2002:a62:61c4:: with SMTP id v187mr29407123pfb.133.1551247862543; Tue, 26 Feb 2019 22:11:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551247862; cv=none; d=google.com; s=arc-20160816; b=ii1KP3AFz5GEN56aWjH2HkZ0mYH//9qsJ27wSHlyGkBUVSdabmS9NdXj/8IzmcjG04 uamdyrqrORD4JXC91NzARtcFzH6wDJZwLlMIz0rf6mPUoIzqDXKN4toVVPGrEik6fFvU 2mFUXQwIUj99h0kfxsei1uXZqptMXKwQJxOXuMvzC1uwhfxXpSMYTmc1FFLECxj0JmIC DNLxaUUl3VmvR/6Mg4JgufX/RyWPNvzQPK3DQWlqAPz4NHA+FM/1y0yeLxvrR4EVfwA5 OaeMjBPzayU5oriuPSV1EdviR2zrC69VljszvO33yZjwHNIfiJVhOPLWtvFLuHJVo8yi zEow== 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=uzl+S8oDICuWbk4VgoY+6al847sdlThKo04zm8asx6s=; b=rc2eRdL9GDO4GpA0nneFUNja258ki5VsMv8lrAZRE+7YDeHiRRQdpb7rFt9ftoCJS6 qPd3D0Dm934nPFDQyNiAWaQ5tFY2nYYWsa0iXa+0XqxyDbStvuY9HvHJ0tJISrW73Bgr xGSIJGwL++zmFuXngnJ86nWZLFqF97h2pl/O32/X9X6jAC3MNornBjJ5lFRUigrUFHbM qz9So33xfEKyafJmfHoZM14XAw4TVUE9Zyq3kSgm/hZ85ahpGQ41ifsCiY6DficnxB8D hLyBKSqf0HnvI1mC9rFfDMuFGiqRylM1K0ur6pzg8OPnw2sfPXsbz++wH1A4aj3QYo+Y yTQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oUbsJTfF; 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 f1si13395479pgo.519.2019.02.26.22.10.47; Tue, 26 Feb 2019 22:11:02 -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=oUbsJTfF; 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 S1730048AbfB0GKJ (ORCPT + 99 others); Wed, 27 Feb 2019 01:10:09 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41378 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730024AbfB0GKI (ORCPT ); Wed, 27 Feb 2019 01:10:08 -0500 Received: by mail-pl1-f196.google.com with SMTP id y5so7461504plk.8; Tue, 26 Feb 2019 22:10:08 -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=uzl+S8oDICuWbk4VgoY+6al847sdlThKo04zm8asx6s=; b=oUbsJTfFHAMXt+/7KULEyJFnjHEKQ/xyCu5hJ6Wm06q0DU+nPiEYxR48Jk2DOiHlmj +UOQK/Oq10rePLa277sTn8v5hK3ydoKnZvH4d8Wy9aproGsqcRxeOXs/d8czJd98cI2P 7h21SwMiKxKneZG8/y2qqMlZcDU7PzYriyvC215FCiHX337jl3y6CxErnnegIgpsYio2 ZfHZgCQXuXpmqrxakvVxsOESQioQnRJ1DrxXubye5G4CgqAHCovU61ek/XEC0uQ59iTA 8mdLQ9h6nMv84poR9UdE6vBShDme1LDUrOvNV2yT05bLyyz7WlyFdKyJJL+O4SAJht5K v32w== 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=uzl+S8oDICuWbk4VgoY+6al847sdlThKo04zm8asx6s=; b=bS+SE7byi/hrg/H+pvp1/0ln64SBK320ZiSWDWp2lP19j4oehlxlaq35ewaeUrKZLd sU2Zm6DPEvMfOgY+y75sKkv+hhnY6sWGrLmU6WPpVeJpYV0NG4Vz3xNJsJPc4s6lIDBM J/uV7lfQltBJhnbVB0rg1vtKhad931oubAuBTP6PtKK0ebknakZs7pmAlyNFAHU5cZjL NSw10FKH2cw8cW7a7DXHwo9N0T+qkbI0FMpC5TnAPmSywNbPWsEW0osLtb1J0x2JVi0m Yzfi21BD3WhUPg28p7R+3ULB9fMiT3tcNTaQUsmxePWbU9un5FoF+PUHhH390CzJFCjn i9Pg== X-Gm-Message-State: AHQUAuYAtMInrZ9O55xQHxrbpFllw9d+9SugK7YlzTRANISRppsbcWuc EKt+MrurgXjyXZuhIBzR8vU= X-Received: by 2002:a17:902:be16:: with SMTP id r22mr471143pls.128.1551247807893; Tue, 26 Feb 2019 22:10:07 -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.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Feb 2019 22:10:07 -0800 (PST) From: Robert Eshleman To: bobbyeshleman@gmail.com Cc: Tariq Toukan , "David S. Miller" , Krzysztof Halasa , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/8] net: ethernet: ixp4xx_eth: remove memset(,0) with zalloc Date: Tue, 26 Feb 2019 22:09:55 -0800 Message-Id: <0f9d3e4eec82da38366721a20030e55ceb311aec.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 removes a call to memset(,0) by replacing the prior call to dma_pool_alloc with a call to dma_pool_zalloc. Signed-off-by: Robert Eshleman --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c index aee55c03def0..8471e1857d53 100644 --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c @@ -1107,11 +1107,10 @@ static int init_queues(struct port *port) if (!dma_pool) return -ENOMEM; } - - if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL, - &port->desc_tab_phys))) + port->desc_tab = dma_pool_zalloc(dma_pool, GFP_KERNEL, + &port->desc_tab_phys); + if (!port->desc_tab) return -ENOMEM; - memset(port->desc_tab, 0, POOL_ALLOC_SIZE); memset(port->rx_buff_tab, 0, sizeof(port->rx_buff_tab)); /* tables */ memset(port->tx_buff_tab, 0, sizeof(port->tx_buff_tab)); -- 2.20.1