Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp264970imu; Fri, 16 Nov 2018 02:08:58 -0800 (PST) X-Google-Smtp-Source: AJdET5dwuJXEqpjeg7lJ6RugINwpjXv6Gu9ausf+eNp2Qa8zCV6nlmW11FSZdspDAOFNic0Bbt98 X-Received: by 2002:a17:902:2cc3:: with SMTP id n61-v6mr10254448plb.76.1542362938614; Fri, 16 Nov 2018 02:08:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542362938; cv=none; d=google.com; s=arc-20160816; b=wIr0gll2ejbuDgpNXPe7/wQJTjkJRS8+ZHfnwdJJ5/ffij2+cjbdZ2fWUKwKf7XePW OdilLqpLLTgqN9aZsnFki+ikf9DumiU5RtWkGmI/aOpzZLqbaZopbzNC6J6pnY0E524B /HyVd8cY820MJCg3xK97+CGpfio1Ddqpgze6Fyd5sQzu9Y/ezHgKpVlw03Dl5bPaHJzP pnAv5pD1HK44+/+0AsjDUrSkADgFgRoj29HhGU9EYI5dhBbvrkZ8txQwrUTiiZbGhEuN EL1dotNUZE4Phu1xBThSGRIhFJ0SNfwODG5gfy6tlcNQ78WMfIQqKzdEZrmIQwHIOiFJ vVww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=J3jELRo2zPZ/HKysts8SI4ogICEmOpaxbYDqtYbylXQ=; b=1FvcU+roG6AiHWdIvS/RSXd17z5pRWf++uXZDQsL9FtX3iofdTg6+9Ff7Nq/hylbhu 0vAbgug+Jaqw4I66ypeiDaSINQiv+u3LwokbKs5O+c4g7lfsHzP2asYfbEV1CbixzcYq lL4mynLGToRFV/cErwEYk/lHslSu25LQyT8Ev1m1NAZQAj1QIjiaqJ7ZWdrmh+LmHZLe DtczEa+6nVUdCTXJR80JwD9xANxWhOUiMXNxDOubnos0kjIjk5McU+jg08gElEnUNXv1 GacGxz8dlVhJYJUK2rP3Jx/a1y6lcvbeH06fa0fkEsAyDbFCD62qa/OHJGm3mDjyEn4p VNlQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w31-v6si31528467pla.347.2018.11.16.02.08.44; Fri, 16 Nov 2018 02:08:58 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389669AbeKPUSP (ORCPT + 99 others); Fri, 16 Nov 2018 15:18:15 -0500 Received: from ozlabs.org ([203.11.71.1]:43101 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389478AbeKPUSN (ORCPT ); Fri, 16 Nov 2018 15:18:13 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42xDQx0jRsz9sBQ; Fri, 16 Nov 2018 21:06:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Sabyasachi Gupta , benh@kernel.crashing.org, paulus@samba.org, 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 Subject: Re: [PATCH] arch/powerpc: Use dma_zalloc_coherent In-Reply-To: References: <5bdfb8db.1c69fb81.c8f62.9586@mx.google.com> Date: Fri, 16 Nov 2018 21:06:32 +1100 Message-ID: <87sh012v6f.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sabyasachi Gupta writes: > 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? Wait longer :) I'm still chasing bugs in 4.20-rc2, I haven't started merging many patches for 4.21 yet. Your patches are tracked in patchwork here: https://patchwork.ozlabs.org/project/linuxppc-dev/list/?submitter=75253 If they're still in "new" state around rc5 then feel free to ping me again. cheers >> 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 >>