Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp82109imu; Sun, 4 Nov 2018 19:29:05 -0800 (PST) X-Google-Smtp-Source: AJdET5f2YQzL0vfVifNlAYx8Fdp2jugpZP/pcJbeK6k8d1i/X+bMIVT7gIsE6lEkdl+VK+ZSqbrO X-Received: by 2002:a63:f901:: with SMTP id h1mr10897267pgi.154.1541388545830; Sun, 04 Nov 2018 19:29:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541388545; cv=none; d=google.com; s=arc-20160816; b=gCFO9+dWXzWG5UhGi4Rxa4bU3HiUMHiqgHX3igMf+/XiMndHpSm+HDAOt7Dd3idivh tS+rkBBW74hvYvriyJyZkDsEz28+E+1P5cVSNxWwvFZ4N2k2YSP/gXMys499YBXFM4ER JyA40smZhPc3lNVb0jMRtndtJrM5qeI9Q7u5LKqaWmcOy4oHvUsVymU7W7BNFxOnBv6T +0AUond1Z9E3ISk3E0DCcxns9kkmN/oXRJruUu9vUqwoIgNXUJvqjUh6VSjNJ+dDbdNb 6qGoi2pSAw0oKxVcXz9MnoarEnGeazWBWqmPyVIpxrLGKPiyqhDQuGXJH3ByDxW+yH9Z 1+ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:subject:cc:to:from:date:message-id:dkim-signature; bh=wYFxU3IgUhH7Pg9xyygtwXTqyyinwl8/Zz4uYWqkSjM=; b=gaTg3UEOStExNW2bKGUpUcmpdDR3CyUghngLUhU6AM5uSN/Tm5QZOvtx5cTXvVElHg hvvm7SJwM8UYH6DRnPQZ1JgmnahPEZfLykQ200uPJSEWBVj0y89pKI2vJLwbMgTMDv/p XpCn58fp9rbPkJbyYHG3dXMybYRIGtM3pfr/+yqJSKhbjy0Ph9SmTBhG/P2nkH2eivEZ bgQHhWZCRTP2yd/aFqAMvgeqXuFHAgPcvUMYTptZL4lJjMadbByJ8oFTB2juUBLGDepS OS+42LDEvvQDZWzzszGPgnBgCk3UkVIT6mc13seeH/ZAEP4eh3lxfIGR6/RwwF+42Drw aONw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=flV+iVsR; 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 f62-v6si42629526plf.288.2018.11.04.19.28.50; Sun, 04 Nov 2018 19:29:05 -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=flV+iVsR; 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 S1727331AbeKEMp7 (ORCPT + 99 others); Mon, 5 Nov 2018 07:45:59 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:33930 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726810AbeKEMp6 (ORCPT ); Mon, 5 Nov 2018 07:45:58 -0500 Received: by mail-pl1-f195.google.com with SMTP id f12-v6so2543478plo.1 for ; Sun, 04 Nov 2018 19:28:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:to:cc:subject:mime-version:content-disposition :user-agent; bh=wYFxU3IgUhH7Pg9xyygtwXTqyyinwl8/Zz4uYWqkSjM=; b=flV+iVsRR0fS+JvDKGdjZC17a+0ab2sA9mrg/ownHRB1YGDS+KKYNcF4ktpjVFm5q6 jyJXdBbBYv4FHBZnV/Vie2CuIuVI7R7pC6HeWOQKQahjQu/gGTEKAsrpAGyWcPwpeHWp ORVGdi1Qrzd2Rq91lFr4V22ovcz+I/rrV5xBk0DUfPxFW8rgwRvUmu2Ke0Z7c4ZhroFY DjXBgOmQndPnVRN02olXNHW1YXaIhTq92UxgNfPr3HhZGbDiFxnkgoDt0j5kGqX2CSBW m6sk86PgOKapT/irSk9/+EptlMz/tU5ifF4XRjbYK2CrxWJaYyVtFH60Wgl6qkTPdE6F P6NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:to:cc:subject:mime-version :content-disposition:user-agent; bh=wYFxU3IgUhH7Pg9xyygtwXTqyyinwl8/Zz4uYWqkSjM=; b=Z+IDiQOhXCiXUmJIyge6zIKyHWvOkMwpexqJddepGu3XYLaeTnXuATZ+ZlMm5GX7Cc Ss9OggLvdm2ud9ewqsCtDI9AAYm1JEUA+ydg5HMO3r4MC7RBo4qJ4eCLlJigBbKE39WB aJgKM+InwZCJy8VtcbNnYGjlWjFRV/QJwlXX9LMQ00FAi+koW/icWIMojDRFa0rgwuFc d/996yqnJX3F8tPkgUouLaszvLr8ewEprIkAqWjGQ02RzRZEnT5UUzJPKtjhXrMmOzGv 2OLQ59lsz9SZdcqxsMz/YAjLoGisrifsV5JS4qmtMsojztEdtXi3B2XLh8ZBmEDW3T7N xRMA== X-Gm-Message-State: AGRZ1gIhMDs2kHf4JVjaUBCnF9mwqgWpma6wCnD/B7CYtLPu+8XepCq6 hCXMOz/chUXw0j/PP3q9xAnNg67Jrp4= X-Received: by 2002:a17:902:8306:: with SMTP id bd6-v6mr20455502plb.321.1541388508206; Sun, 04 Nov 2018 19:28:28 -0800 (PST) Received: from sabyasachi ([45.116.191.235]) by smtp.gmail.com with ESMTPSA id a19-v6sm25626919pfi.138.2018.11.04.19.28.26 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Nov 2018 19:28:27 -0800 (PST) Message-ID: <5bdfb8db.1c69fb81.c8f62.9586@mx.google.com> X-Google-Original-Message-ID: <20181105032823.GA4558@sabyasachi.linux@gmail.com> Date: Mon, 5 Nov 2018 08:58:23 +0530 From: Sabyasachi Gupta To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, joe@perches.com, darren@stevens-zone.net, christophe.leroy@c-s.fr, geoff@infradead.org Cc: jrdr.linux@gmail.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] arch/powerpc: Use dma_zalloc_coherent MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replaced dma_alloc_coherent + memset with dma_zalloc_coherent Signed-off-by: Sabyasachi Gupta --- arch/powerpc/platforms/pasemi/dma_lib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/pasemi/dma_lib.c b/arch/powerpc/platforms/pasemi/dma_lib.c index 53384eb..d18d164 100644 --- a/arch/powerpc/platforms/pasemi/dma_lib.c +++ b/arch/powerpc/platforms/pasemi/dma_lib.c @@ -255,15 +255,13 @@ int pasemi_dma_alloc_ring(struct pasemi_dmachan *chan, int ring_size) chan->ring_size = ring_size; - chan->ring_virt = dma_alloc_coherent(&dma_pdev->dev, + chan->ring_virt = dma_zalloc_coherent(&dma_pdev->dev, ring_size * sizeof(u64), &chan->ring_dma, GFP_KERNEL); if (!chan->ring_virt) return -ENOMEM; - memset(chan->ring_virt, 0, ring_size * sizeof(u64)); - return 0; } EXPORT_SYMBOL(pasemi_dma_alloc_ring); -- 2.7.4