Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8338376imu; Thu, 15 Nov 2018 09:58:36 -0800 (PST) X-Google-Smtp-Source: AJdET5fFe0GDuXLhAyVRYx3Gf0G9zkN9NMuvi8KQp4x8ky432Nj8O+OyrG31Q0A1zEmgncTfSvTG X-Received: by 2002:a62:15c3:: with SMTP id 186mr7697095pfv.240.1542304716314; Thu, 15 Nov 2018 09:58:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542304716; cv=none; d=google.com; s=arc-20160816; b=uxhhfTJ8xGWL39vHsLOWX7FlBInh/tttDxMlu1/6hP6EkZVgYOWgeAgMcrfPYPe6iM 0qbYUkoeSRn4k/8sWRYtsPJfLoH1XP7gNW/yP0D28ooNZYA7qPuOVdw7hZsfn1jg3IQ/ hmMSAugsgaSTgXLdD5YcrbXdUd3jzsygHPdv+8QOpFgzuGamnHds0jJWxn+A1StrS55A 9dBDnH4TjNYTyFCCvsfFOwzcqYRFLidfG+50+AsIQb5HfKKGlq/b3z2UEn9aZu8+Nzf5 NrEGZg7MiIQ7P5kdNkK7BI3RAer2FoS8rr2UsBNh5KCXgZY0kjyz0qfFu1DdZELxL+Yi KISg== 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=6G2KpmpfCtmqQlw0KlLFcSMUcNS3EWFTLTfjH5tvPWA=; b=RKvwhl/YpJgLlaDbP+RxLbfGywNSkGAdwdc0YqW2JBvIigVN1RcCsdMFeW8E0Df/zf dFsxKE5b/gLTDFeulsWl9jyF3Z/gIXnmmu8Y98ZD8DTRs6BbAVtjI6yq+jIWSwyRZbLL UOYlJsrf4j+aRGr/qXDIV2xvSvKkE0ad8nLnOfFSxX17ZsL3GfwzQUbEafYL+5eQxzMR 90xBRi1w0bSm03MCau5PXfbTN8WXZ1+5Yi4rKfbwK1jN26ROCmBgzsRyVxfEN8RgkvX2 uQXl3hqv0j+T5s/eh7vWDcPv8EURdCoQ8zS65o7LQrXED43GMZwzB7I/xHlgm8MrMHSx p72g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="N25TH/eM"; 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 18si25662993pgo.331.2018.11.15.09.58.21; Thu, 15 Nov 2018 09:58:36 -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="N25TH/eM"; 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 S2388454AbeKPEFE (ORCPT + 99 others); Thu, 15 Nov 2018 23:05:04 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38429 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726453AbeKPEFE (ORCPT ); Thu, 15 Nov 2018 23:05:04 -0500 Received: by mail-pf1-f196.google.com with SMTP id q1so2055388pfi.5 for ; Thu, 15 Nov 2018 09:56:15 -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=6G2KpmpfCtmqQlw0KlLFcSMUcNS3EWFTLTfjH5tvPWA=; b=N25TH/eMZ1eCRPoRQyH7sADMQ3XHsVyGl2bp2bJISV5mhZVqNr03ivatjocEmFIEt1 gdH9/oeuBBJzCv+EdtZBPdhxHFxW9aM7c0Vu3GmGX57ZThpxrwGsCujJ6S+xmX1YJNnH 8BJetUAtSL3ksa7GBY7T7l06bf5of9FOSRz0zYKGwAEw5SYhcPN2DktovulmYB0lF9Yx CI2QpSNkl1+ECtmWYyGuKUBM33VXeOJkoyA6aLdl1deZIeJaenQFy7djxwTNCZ4JMzgs sDmPnuIzHEXdjfEbZ3eoIS3uVESJ8DLhI98nR8CeUxXBXPOwfiPVw8H87eAIXw5eO/3I FdZQ== 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=6G2KpmpfCtmqQlw0KlLFcSMUcNS3EWFTLTfjH5tvPWA=; b=bSxXmFIje2m+lwBYOlFJ2KjAJqy5cX8qLMBifWBMOC+Ac2aYMrs/TKbmo0TjcFFiCV Vpc8H6ayIfhehpLbzD57rDLu2Nx5y5brElWaxtHpHCg5OF+UDTTTsrQKb8qxRngI6zWg 74GSdXZu8FL3xPiukxWFwKn0doBWKvKYA9SL8Fufr0/bRJ7u+mg2INOgc66R1Jeyk70q wV0FyEMdhh83olzV3YN2j1aelfY4p2HUjy+0QFvj1P9x3ldSmfCshOK8IVkVzjf53XUc KCLTOZGbyeowG1XfxBGkEU3BurjUrrGBr1P8wJfHAcsbTxmOmqK0Z5n/VpqyLkSPbEXa incQ== X-Gm-Message-State: AGRZ1gKlRuu6mygMreT3xTzyOJwMnP6hW5y6mAJJAWwcSu0sH8Vz5Ur4 Zo6MpaydIOoqy8pC3CXDsepksrEKT1ov1QgKuo8= X-Received: by 2002:a63:bf0b:: with SMTP id v11mr6874893pgf.302.1542304574924; Thu, 15 Nov 2018 09:56:14 -0800 (PST) MIME-Version: 1.0 References: <5bdfa97d.1c69fb81.4aef7.c9f7@mx.google.com> In-Reply-To: <5bdfa97d.1c69fb81.4aef7.c9f7@mx.google.com> From: Sabyasachi Gupta Date: Thu, 15 Nov 2018 23:26:03 +0530 Message-ID: Subject: Re: [PATCH] arch/powerpc: Use dma_zalloc_coherent To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au Cc: Souptick Joarder , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Brajeswar Ghosh 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 7:52 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/sysdev/fsl_rmu.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/powerpc/sysdev/fsl_rmu.c b/arch/powerpc/sysdev/fsl_rmu.c > index 88b35a3d..8b0ebf3 100644 > --- a/arch/powerpc/sysdev/fsl_rmu.c > +++ b/arch/powerpc/sysdev/fsl_rmu.c > @@ -756,15 +756,13 @@ fsl_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) > } > > /* Initialize outbound message descriptor ring */ > - rmu->msg_tx_ring.virt = dma_alloc_coherent(priv->dev, > + rmu->msg_tx_ring.virt = dma_zalloc_coherent(priv->dev, > rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE, > &rmu->msg_tx_ring.phys, GFP_KERNEL); > if (!rmu->msg_tx_ring.virt) { > rc = -ENOMEM; > goto out_dma; > } > - memset(rmu->msg_tx_ring.virt, 0, > - rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE); > rmu->msg_tx_ring.tx_slot = 0; > > /* Point dequeue/enqueue pointers at first entry in ring */ > -- > 2.7.4 >