Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8344291imu; Thu, 15 Nov 2018 10:03:16 -0800 (PST) X-Google-Smtp-Source: AJdET5fp/Lb1F156z83CQUaS2sGSHURQ5lecaayOASk2zCKv8v6wkAHeMLI/1xr2TcPvTwk5R+eb X-Received: by 2002:a65:4142:: with SMTP id x2mr5379087pgp.356.1542304996004; Thu, 15 Nov 2018 10:03:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542304995; cv=none; d=google.com; s=arc-20160816; b=kv3aO7OGyzmHc5jQrusAly53adVi/5+XI9ugWLmA+KkCvYugBkZfWssaz6Mj+Peztb A0jefA4ZlayqjZH6Is2Rmh5ANAb8QxJfsO2PzswrKSGJ5Gu0xobjVzSbxrnqQ58uMTSo /TQyxvpoSLhXGflUy14b1fyHeP6zFG31m9j9R7KuGmL5VKCRJZBS/SoUVJSVTGhsmWZo OTeuvpaIJJByHV7ZUJq2GTG+NGA0Y5Ob5GhGVyFsDBTIbQ3qhOihj3BbkojTAD4d/1D0 TsPylVF1Y598fts9k4UxNP4uAmI5o3YjWf4pYUwLowb3t/Q2BtP3PhUAvqPPmbMTaMCk V6mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=53ULN/eUPXJWILCpXkBWhrT7ZwImYSEtLPNzjJN0TII=; b=rSdT6iJK4trEEOs6y7PJpiB+3gZmd1v5zgpN6y84EoyW/Ufc4LW33MwMnRR+1gqXNy 6lAEmpUlbbHUdnpO5128Wc6XHbVeVUXcdE/pFGf3ZdxoeoZu7iU9Es8INgcO2VZ7D5or wr4Bpm4pBVEByUqQnUF4efhcBXTZRfYgO1GlEEBpybzS3t1o1SZVC32F0E3SJYGKhSHP /3uSYFLqcJUewgYG1jFQUotT721QZBwcpYeZQQ1NEkgtVaBnl0Dsiry1REIE5hxys3lr Sz/QCrq3FNkIwAyNlCXaGruDBjb+aiTeRqC8ChiUQbWxGQZSF6Bxsx5iSGycWDYRJYuo 0fpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AmdEQBVj; 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 2-v6si31167090pla.223.2018.11.15.10.02.54; Thu, 15 Nov 2018 10:03:15 -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=AmdEQBVj; 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 S2388789AbeKPEIy (ORCPT + 99 others); Thu, 15 Nov 2018 23:08:54 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:42098 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726453AbeKPEIy (ORCPT ); Thu, 15 Nov 2018 23:08:54 -0500 Received: by mail-pf1-f195.google.com with SMTP id 64so5583652pfr.9 for ; Thu, 15 Nov 2018 10:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=53ULN/eUPXJWILCpXkBWhrT7ZwImYSEtLPNzjJN0TII=; b=AmdEQBVjNuJFw+0ioZ3L9QRNJ2+RS0FiClJTht0FofgD5UK5Q5SIrK4kjWvUscbD+g sSClySqVNbX4A3jIF4d2A6qo0BjLS5oQccO+sZ/ZHzLVvxX4THBcSD/dZKECUWSKgdJg JxpCZimjupLMLl2X6ghjl7Pd6BKVYi4fjiyJsNo6BxYQ3nBHWCAyeHcBfTYOfxbdKAgX Dn/vjmQzRtqnFASg/1HPDtrxU/6C0FNzQdLhlC5yc814U49ylyiqAsUs5efbj7SwU6Tu dgcbmWh4J5/1djkP0VFpiXloqVTTBrAyn2Puic5KoNma9uiXDcohALgrPRVfeJ6FUpyn t6og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=53ULN/eUPXJWILCpXkBWhrT7ZwImYSEtLPNzjJN0TII=; b=kOJnRIhA2Mo8aHw1/LaFDaSSC0nx9D0oFi0UoUoP6bBwkhKZHZKcz7bREWx56tIXSJ ucq+Qcjsjguy715OqSYIpWF1Gu2nd9qN6uXLtMwNUG0ESCPujog40X9WJxuoO6ldTN34 rRNDw3aGcL3HvfJV8VpswRjRypbGJ31Uw9nizB7phInXoicd3V6Y7ZAA0RnHZcP5fegn UoZ18/GVpiYoIVJv+XZfqT0cErGFoXKSjAYOR+enD5qKhpcDyQfa/x4aCCetAUg9mfRH 3HryErwsysCchRgJAZ/k2V7a5mXTMCy+XK5ZD+ra6BC3yPt841Y/b4gDhvB3jSYOe5r1 EhCA== X-Gm-Message-State: AGRZ1gLtzLkfxAnnyRy/U/HiVtLJk3Oo4OARdH7AdpGlcz0rpuDOnpTS Mn9EtTxh37yjAgzBR8G7RDMThLEEqzKtGkf/deA= X-Received: by 2002:a63:7154:: with SMTP id b20mr6685371pgn.342.1542304804137; Thu, 15 Nov 2018 10:00:04 -0800 (PST) MIME-Version: 1.0 References: <5bdfb8db.1c69fb81.c8f62.9586@mx.google.com> In-Reply-To: <5bdfb8db.1c69fb81.c8f62.9586@mx.google.com> From: Sabyasachi Gupta Date: Thu, 15 Nov 2018 23:29:52 +0530 Message-ID: Subject: Re: [PATCH] arch/powerpc: Use dma_zalloc_coherent 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: Souptick Joarder , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 5, 2018 at 8:58 AM Sabyasachi Gupta wrote: > > Replaced dma_alloc_coherent + memset with dma_zalloc_coherent > > Signed-off-by: Sabyasachi Gupta Any comment on this patch? > --- > 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 >