Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9062703imu; Tue, 4 Dec 2018 20:43:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wih4aJofI5Ue6oHw6ftO7iIbyH0NxWYoNE7n2+ftY6jYERO+jZOMBpdTWT+RIqIeJUe8zP X-Received: by 2002:a62:6cc8:: with SMTP id h191mr23728727pfc.89.1543985002691; Tue, 04 Dec 2018 20:43:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543985002; cv=none; d=google.com; s=arc-20160816; b=POrBC4Zg5SEjg6TTGu0sULX8/2fGuL0hb5Rh3vDeVVsPrvPcJpY1xOCdhfsTiwfpsY xOcMGtX/+vmpG9JsxMCFLrElNDovjcJzTv1N8wKqAH37PbXmuFV6qdji8LFXQ1lKRmXN hfJaMV/EuM2lCyEXV9qaBy7HjO11cfat5WyrogYyaf7djNC1x7/PSsX3aFaz0T7D7cVa vw91Qwq+TELqRRSY01L5kqGAQS0Y//eUZlvThzXqpWUTiqAwDaaVoEivpD69WnWm/QqC aI5Y1paxnaRquhFX4NHZSzZiXpRPMXbw29HXWJ3/AMuoZfzg9mUbGJ/Y5sLn0wCVvaMl bXrA== 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=xbpCgYGBFolvkQmZf64Xa2Qp+rlzB9GNLQ2fOnxAlvTuY/HM+x8nI25fg3ZnVBxkfE JG61PNOLMwgalD+xmVyZsqOwLfXIFzUwjbL6ObhvDTvELxOaSMHaUI34H8kDak1qjOez yqx+JmwaPKAey6Pyu8yLzDWD7m4Zl5KooXo1a7ijfjobFW4mfmhC2Si9yQp4c42i5EV5 g5TeIUiCp3UtYiilhGLF8BvtO8+PPayf2HVmjJ6zD3QU6baJGJeJgYt7Q9k/ikJZnJJp YbBETgM8qzpUCt2MRaKHD2LkXivjeHG1m7/Vdek9dKiO/EI0FqGb6IUbfoLWmaNd4o9Q oWPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EiJexr60; 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 n3si19199559pgf.374.2018.12.04.20.43.07; Tue, 04 Dec 2018 20:43:22 -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=EiJexr60; 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 S1726986AbeLEEmJ (ORCPT + 99 others); Tue, 4 Dec 2018 23:42:09 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40675 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbeLEEmJ (ORCPT ); Tue, 4 Dec 2018 23:42:09 -0500 Received: by mail-pg1-f196.google.com with SMTP id z10so8410198pgp.7 for ; Tue, 04 Dec 2018 20:42:08 -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=EiJexr604usee2Xz36cu7qmvYq262sxHpdFxW1/kmiqcvFpbUhbS+sEs4uFrQU1wq5 wkxR2E2vB8PWm/vaHtZHraB0HKG/1v8JbcOOMdc1cgpQdHrEYGerkflrTqD+xDbqWQEz LExpdikPc7hWY4zOC94400OA4AQr2U06LbUb40PaQN9MbdRQfmwRKTRA7032QPRw6v6j JjWeNWMROwBW2L4DgS5gPeGPB6sQ1V60wDuiKlyijNcWch3uPK7B2d71T/jtxHvoIXkV bIprobZBLZ1KtxFl6uFPpxmCN8yg3G7HzhDmtw4GQuBg6LbK+CYACGhQO3qgs4t5Qrzq +Mcg== 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=IjBqRXCvQ+1SxdVAKrKAsaLbrZXLeNxlox2v1Hex7QQcL13e83ryv9eu69atX6Hr// 8uuNFG9atgeb8AQQ8fHZ2khxopnzpXkAYTesxF4fFS58RNRNkteULshs/cFuKJsJLF9I 9wNZ48G1upBklFcTJkRGFzDxRcJX6z5yaCIeSxXRG8HlCiXluWxORMGlRqQJNJW+V3MV HUsRGKZdJghGhgMzdRuYwfwTOYxQlGNeq+LO1KKykGWgqlFDTCB25p6+/q1Voaz9bO+e dk/hABopesxg3Ry1hfcFH8fCzCCzVT/uggC8kGJvmz2C18hw+Oahrc9JlAnKFQ1L4QK0 ufRQ== X-Gm-Message-State: AA+aEWbyeizsVWnrHM/o+d5vybWK40NsSK+A09s4ZJNW9R98pUp0g5G6 ozU73jATSQdTf/vBHcPBwW1PoqEgUBsQJS2Cuoc= X-Received: by 2002:a63:4d66:: with SMTP id n38mr19256346pgl.270.1543984928422; Tue, 04 Dec 2018 20:42:08 -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: Wed, 5 Dec 2018 10:11:56 +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 >