Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3699285ybi; Sun, 14 Jul 2019 20:21:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqofAtHdtONIpGjkffzGohMCJL4Qykfm3slPs/9xXVWXxAd79QAWeBnwVNV7yQ+xe4i+9K X-Received: by 2002:a63:788a:: with SMTP id t132mr24893733pgc.332.1563160862814; Sun, 14 Jul 2019 20:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563160862; cv=none; d=google.com; s=arc-20160816; b=XnZxKuhaGPSuU4c01aIVCig1760Ekp2JkUkUfD2iaUmqRUBqShjoY0fYrqUw8T6nv7 8CcJLFZRnX29D8vBjcyun0HLfUtBqI7DaZ/QZilqV73DYCqKM/sWa6spvWHWl9nf8ysS YYM6xQ4npropEKPOkgYw7sXTo8NsVPdJj8bVrxDf74DIFd2KbA17DsTU5tmvPek+7lN7 dRjJGhY67vVpGDTiRUh5oa773pH2JQ2qVXkXNjEewTc+HSOr04oIpqjfS71hCpIvvdDT Cwixc6MwEOMsrYTnMhqQZC2X+O7HhIjlTfF3ngWp6kNtpXm0krNxdxiI3h6VZEG7s8bf 3KTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :dkim-signature; bh=dE4s0OhkbyjtLoyb2cJC6b5aCQ/NmMNOFMVLWNoGJqs=; b=Tfmu5dFEIQiu2Du0MdA2wZVZBy+1EW+L1cBfZVsqsQeGg6/uY2dlRzr5O8k0fFC0G/ EFePHSBBLjakoxuNpBxBl31PTQ97ni0ITonC6fRCTsdA7mrnDH3/NXpOl+uO0g/FyNg/ 61zgFGLr+GFUJzy5o3vYXmhMTDR6nFuhIaQL4EmMtOCrvaQ1XRIBoLv49SOW9QKrM8aE A7j5k7WGqDdSCkidEXdjhW1Nrwcyz65kDfY8SpnAkKlh9DEm1Cum5BUwm9gfqqrp+YBb D0nOrTMUAX/Dzm5IY+BfkmTIIrjMA/MHsk0WMbPN4c2JIr2ODdXMD3BtvUCEtGBwyy75 9vBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=b1IfCBLK; 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=fail (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 s11si16147352pgg.200.2019.07.14.20.20.44; Sun, 14 Jul 2019 20:21:02 -0700 (PDT) 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=fail header.i=@gmail.com header.s=20161025 header.b=b1IfCBLK; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729329AbfGODT3 (ORCPT + 99 others); Sun, 14 Jul 2019 23:19:29 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:46340 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729088AbfGODT2 (ORCPT ); Sun, 14 Jul 2019 23:19:28 -0400 Received: by mail-pg1-f194.google.com with SMTP id i8so6981492pgm.13; Sun, 14 Jul 2019 20:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dE4s0OhkbyjtLoyb2cJC6b5aCQ/NmMNOFMVLWNoGJqs=; b=b1IfCBLKMhumYmRbCzq/AJukPBRYV2V8P0kpS4mf3HHbtXyjW8fBQhF6KDCIuREKoY Vr3vcJHmg8yINW1wnYUIbULvVZy0+gRthgKHobn+fQxc2rRkzgJIwgvca8g2jin5947Z iOTFuZYdWXcO4fssJTcW5zuyaI8Aq8GSLQnZp/3A1ycchbBFbDYcs6tiDvwpIrFKYhTw 9eGEFYi8dborhS8ztPnhnh1TTqoB9DdsWg3/mIx1eF6ccUniQTRxg5RNtblwdlA5g+gb O7hoaYb3uaD5iyqKLnJC6am8MH2tAdP4QcKNKJm2VAZ2zGgUCYYz8bLRSzgCcSnJ/Rdc 1gUQ== 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; bh=dE4s0OhkbyjtLoyb2cJC6b5aCQ/NmMNOFMVLWNoGJqs=; b=K30prT4UIW8XBRROLBN5y9EeThXZBjwypK0Cg4wp9ccCahZK+TnGjR/dH0ycCWDaUX MsHcZMBwexQxfukVNL+iRQRRZga4EkEeahlKFNGzqeVmwdO3zqjl6/2oYqXXy2jjTEJy 1cRK11Mj/GfUNrfYV+tSk1XV2CA96SlBXlQqYW7Gm4gOXk3gEKffPD17S1T4FBP7BrHZ 4gVN5z8reuMV8RjvTqiNi8Hh/Qknn8jobzerYVnlXsmcBTN5unWw7MW2DB9mSdBNC4Bh CwZaqxIbf9ryqf+KhjxauqjmUlFO0Gs8ZJ1MF4zqw785mxIcYIYRXgL72zbo2uZCppbc VdrQ== X-Gm-Message-State: APjAAAXpttwX+1Q6O4yQTqTbWnzIxPMsFAarR7iuZtIKPgQpmVGYigu1 UN+if1rGVysPHBnnFmnYS5o= X-Received: by 2002:a17:90b:d8b:: with SMTP id bg11mr26744825pjb.30.1563160767835; Sun, 14 Jul 2019 20:19:27 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id o35sm5683496pgm.29.2019.07.14.20.19.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jul 2019 20:19:27 -0700 (PDT) From: Fuqian Huang Cc: Jes Sorensen , "David S . Miller" , linux-hippi@sunsite.dk, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Fuqian Huang Subject: [PATCH v3 18/24] hippi: Remove call to memset after pci_alloc_consistent Date: Mon, 15 Jul 2019 11:19:21 +0800 Message-Id: <20190715031921.7028-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pci_alloc_consistent calls dma_alloc_coherent directly. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/net/hippi/rrunner.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c index 7b9350dbebdd..2a6ec5394966 100644 --- a/drivers/net/hippi/rrunner.c +++ b/drivers/net/hippi/rrunner.c @@ -1196,7 +1196,6 @@ static int rr_open(struct net_device *dev) goto error; } rrpriv->rx_ctrl_dma = dma_addr; - memset(rrpriv->rx_ctrl, 0, 256*sizeof(struct ring_ctrl)); rrpriv->info = pci_alloc_consistent(pdev, sizeof(struct rr_info), &dma_addr); @@ -1205,7 +1204,6 @@ static int rr_open(struct net_device *dev) goto error; } rrpriv->info_dma = dma_addr; - memset(rrpriv->info, 0, sizeof(struct rr_info)); wmb(); spin_lock_irqsave(&rrpriv->lock, flags); -- 2.11.0