Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1427161img; Tue, 26 Feb 2019 22:10:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IY/E2dO86Ry+99zOsqcVEvO11yOzAV+nA/p4MMuT0QKdEvZRnvL6OkdYCu1IVS5LbD46oAZ X-Received: by 2002:a63:d703:: with SMTP id d3mr1392574pgg.167.1551247846060; Tue, 26 Feb 2019 22:10:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551247846; cv=none; d=google.com; s=arc-20160816; b=hSHrWhf4tsTNAhFhK3Yw+kcvoG0rHH8+xir25FgUDGdREZwrP9Y8NMECfKTnA4sEbN vrc4AfLt2LPaVpVbIX715uX9EsxXS+sI5cvh0vTtJyLnVF45+ainOOFTM4y9ZUwouPHB DXP/qakG6Xo2Uzs5osAZIfK0m9MpVXCrlQtmUCiG8ojY6iv2QNIEr2ElVhkktyOBmIzN ELo547uyFwq6+r+chqXn3Fuhjz1iR90LOI8ae8saai7xVqNrgonw5KsuS1j+H3EzasA3 puSKpp3rliwvI3i3WJf6EZrsMUTW5RRHRP/zDzpk+PEOUe70e1uZKTR3MioL+4n/VqKI SDmQ== 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=r3a2hf4POYiTeKcmsyeGQC+488vzRS8ccxKo/w+H1ck=; b=ww/dmcRP3ZEBHTGYAzmQxmJEl/9ulYa0k27qnzE9u6QTsw6fw0LVFZ8qjnP3DTySts bH10vMNLnwVtEjCXBngFs73jDJ8Z16fXhR1HlhwoYAMjtTu9pfltV+r6ce9gj/Sw8eTr v+XqbsC+1TIi9Hp1cpRX8LnGnn8lTeCYbex8rRzVqeJdE8vViKAe95QDGXZf5MlQ0jLa /1MzRxCVXZXCv3ZYFMiBouFsSJRw7N5YQjTKsxtr8rbBu8PEQk+aLPtxQqv13iXzihoc ZPiaYVojFqBFf8G0pwjo4od52Jv6IKdGHp/mAPdMn26ZYYU2VPT6R8mPWv0GGsPd+AzT DlLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=n+3czmKt; 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 k30si14067665pgi.146.2019.02.26.22.10.31; Tue, 26 Feb 2019 22:10:46 -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=n+3czmKt; 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 S1729949AbfB0GJ4 (ORCPT + 99 others); Wed, 27 Feb 2019 01:09:56 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:35620 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbfB0GJz (ORCPT ); Wed, 27 Feb 2019 01:09:55 -0500 Received: by mail-pl1-f193.google.com with SMTP id p19so7473037plo.2; Tue, 26 Feb 2019 22:09:55 -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=r3a2hf4POYiTeKcmsyeGQC+488vzRS8ccxKo/w+H1ck=; b=n+3czmKtUTpMp4LbnEdh1ap8N3heUwfcM/KQc3TQhM1r7IhldV8p3Uc7qx6cPw4GE3 FrWm+8JE2/V2NHBVshoDZesG2oFqBzonJlva1ub05HPU7fAzZW4XtbdsONQHoGReAnPT 1GpnAbRXnnif8IbVz6reNS+LPbLz82v3D1XdyoBSF9bfdqUSc1DuZvgbPkAImo2PrKhJ qjMF2Kyd23BIsGK5GMcvBhEFe1u0xtXbnfcuzijJexUykoo3bBNuYhbImNrH2yCL4A7E Q9ZwZx8vBu1cUADhmICWAlc5NdxEdfLGsUGWWnQhFmqXcKzR0dqycWGFMfrnz/8nLJz5 zXzA== 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=r3a2hf4POYiTeKcmsyeGQC+488vzRS8ccxKo/w+H1ck=; b=pZBPxneaxR1adU5qnFkuJFxEhiVaUAWLoZn4Hst7KsvVN7bVhPFDNl3Nhr0JFb64IY VsilipOIvqeckqMTAH8Fsnt/JY0JTO473XSIZwYG187iGqEHdIpr8ntV/98CimTHqC3d uNCn9pDz8Ig9moMqX/vgt++5GDUmpVYnqOhLBoAZ1CJttxQmLHkaOXfbEvKAhqXWesTp XGQbNYbENX6/h+B53WCEfbVNvac+wiV5giPMd2iSgZe2DMe7JsijFNiisFjIKtwHs6qU lrWCkAunLgucosDU6ajLDPpQXYKVzbywZluOypfQClGw0dWd5emOqpjtZgkqeR0brQ5I 86xA== X-Gm-Message-State: AHQUAuYO0bGv1Gsx/MS0V0BLY7S6HBALVIAWKpY8rpqejw+D0aq2ublb gJBbE+WXHMSP5uer2NzUZhM= X-Received: by 2002:a17:902:2a6b:: with SMTP id i98mr431161plb.153.1551247794490; Tue, 26 Feb 2019 22:09:54 -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.09.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Feb 2019 22:09:54 -0800 (PST) From: Robert Eshleman To: bobbyeshleman@gmail.com Cc: Jay Cliburn , Chris Snook , "David S. Miller" , Tariq Toukan , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH 5/8] at12: use pci_zalloc instead of pci_alloc Date: Tue, 26 Feb 2019 22:09:52 -0800 Message-Id: <485f61fd135d56e6e0c66ec41770ce7e5b8b219e.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 replaces a pci_alloc and memset(,0) call with a single call to pci_zalloc. Signed-off-by: Robert Eshleman --- drivers/net/ethernet/atheros/atlx/atl2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c index bb41becb6609..a145c2d1b1d2 100644 --- a/drivers/net/ethernet/atheros/atlx/atl2.c +++ b/drivers/net/ethernet/atheros/atlx/atl2.c @@ -300,11 +300,10 @@ static s32 atl2_setup_ring_resources(struct atl2_adapter *adapter) adapter->txs_ring_size * 4 + 7 + /* dword align */ adapter->rxd_ring_size * 1536 + 127; /* 128bytes align */ - adapter->ring_vir_addr = pci_alloc_consistent(pdev, size, - &adapter->ring_dma); + adapter->ring_vir_addr = pci_zalloc_consistent(pdev, size, + &adapter->ring_dma); if (!adapter->ring_vir_addr) return -ENOMEM; - memset(adapter->ring_vir_addr, 0, adapter->ring_size); /* Init TXD Ring */ adapter->txd_dma = adapter->ring_dma ; -- 2.20.1