Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5166904imu; Sun, 20 Jan 2019 05:07:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN56IyaDxHLdbV1OOk0xlO8ZVQ5G+KLc5U/fgT04QoW71lCiJtZQVmx/q/4UJ5lq/PcA1Cm0 X-Received: by 2002:a63:b24a:: with SMTP id t10mr23783058pgo.223.1547989632114; Sun, 20 Jan 2019 05:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547989632; cv=none; d=google.com; s=arc-20160816; b=qwT2aHbFacp1Thrdytc7k2yL7ZSc+oDxwj4bmb937nymC4HEbl7cPZ5rbS0wK0gftX kHFm/28u3A8meAJxHHl0p0m6i1tSTvP1JbsS8bkXQrsiNbT4UTXxhHFi2KE72QBQaEVr yKA61xPX0BBLoHUPBEP9zXWdnHXs65Izd8nUmimoQ57r+WALw6BJ1Pciy+93yLdrIisY iNqMrqN3fgLIcwtAvAMdrhRPOmR7e4ygVJ2+1I8R42Nr9rUcct8+/PFiDXXRRtG0D7ln OOIpmFgQYirMfw/A+ZYAMtdHxMPwQjanKi/Dt1WWQwCK3ZWvMMNOCsWMbIrvXF1WTfQa vYpw== 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=rw8t1BZ5ouoNoJISrQlHLxtYmn9AYuqm7x0WnAVcO0U=; b=iBcYtF4WdCWg/ypTfnP4t1pHWL3ERCWBx882+RUJMlBG5KgbcYtap2KOJZ6NgyPW0j uwdN7ZT9c7+po3qo3Ex/PRYVyBHCXRloBJe/Pjs/z6PqrDS1WlsaI1vx4DM+zCE6KN/P +H7TbzAEqbHd/L5SL1pLaqGHh77cW3+N6OXgmvXLqhKKU1n9N8g1KrZvcL9narGOlE5F 3EN2BnofCk6vyqDc8AaVJBR6opnIytHw4hypoHw27YbsmbiJyUuXnLJbvP6FmioCS0Tu VV5W4QM5npJhoXsyX7p3aqpetUL0Nl+SQFFWJa76S4KWOPvGT1P0Qu0GDAbiarJ4lKZl cb2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bQs1yjEv; 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 e8si958021pfc.248.2019.01.20.05.06.42; Sun, 20 Jan 2019 05:07:12 -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=bQs1yjEv; 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 S1730577AbfATNE2 (ORCPT + 99 others); Sun, 20 Jan 2019 08:04:28 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:37770 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730542AbfATNE2 (ORCPT ); Sun, 20 Jan 2019 08:04:28 -0500 Received: by mail-lf1-f68.google.com with SMTP id y11so13614975lfj.4; Sun, 20 Jan 2019 05:04:27 -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=rw8t1BZ5ouoNoJISrQlHLxtYmn9AYuqm7x0WnAVcO0U=; b=bQs1yjEv3evOioeCPWEHmkMJ32xQeloSBCy4740ydb67MK1T0FX7nhNmXfeXQ2vtyt FJcapcAQVLss9tgxGJUNybjzgpPitjl6tspycTusnOOJeru5h8qBnVsuGpRgKitKUJqz oOmt8Vz7GV0ncmsLfuP2OMqOIHQ5lKw6zQLkb2xi3XE2wOiX0zqdgLavg+y/O0iSPRGY zGka4VbDm0z2Zc7TRorbc/og7z9aeZD+zrSMRARWK84xlssVQ1Kj0sXqvRaIS1D0N6Wf WJNsjKZUl+6LPa0hqjKTzxw/wbgOGe10Y4RDtotOIuV5aQtqV0RsQZhxRQmnBmpZEFSC KE9Q== 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=rw8t1BZ5ouoNoJISrQlHLxtYmn9AYuqm7x0WnAVcO0U=; b=RQA4PEFcMeScBLEIiqynr+E+mirjeV9PA+g5Z5R7v+BW/bJF3aHnUAbIXG5XHzToFy qxIc7Ow3vrR8M25f4W0CppJE7+XYJEIiv3FWL86wSTBPk8HxfD2ucquTr9NTH2dQUQbR j7nxYsI/xToVFp4+9KqPuH5rX3EAkGpOT9tsPQ9PlHNKxUMg/IF7jP0DMprQY2xHFGB7 J/p3xJwAdimu1T9IJqOE+Ood0JR3euHsBKcHmkjzflr4Ma3tghaGDpJNbFjS/arrXQHs 3x6i80bsh31L9uyzowgcBEotvGvXCYondwLsbNCRNm93G92IvBisXUllM3o2GDAUw+zk qV3Q== X-Gm-Message-State: AJcUukdO960Sj/5e6doW6PFDtP0ntEZXE7dBFkIFb/0yXT/AHkWKjPNx gprTOA2PcC37jTGZf6H1dF0g/Xezozw+acKpU3U= X-Received: by 2002:a19:d90c:: with SMTP id q12mr15581326lfg.24.1547989466271; Sun, 20 Jan 2019 05:04:26 -0800 (PST) MIME-Version: 1.0 References: <5bd55e34.1c69fb81.b2503.b6f5@mx.google.com> In-Reply-To: <5bd55e34.1c69fb81.b2503.b6f5@mx.google.com> From: Souptick Joarder Date: Sun, 20 Jan 2019 18:38:24 +0530 Message-ID: Subject: Re: [PATCH] arch/sh/mm/consistent.c: Use dma_zalloc_coherent To: Sabyasachi Gupta Cc: Yoshinori Sato , dalias@libc.org, thomas.petazzoni@free-electrons.com, robin.murphy@arm.com, jacopo+renesas@jmondi.org, linux-sh@vger.kernel.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 Sun, Oct 28, 2018 at 12:29 PM Sabyasachi Gupta wrote: > > Replaced dma_alloc_coherent + memset with dma_zalloc_coherant > > Signed-off-by: Sabyasachi Gupta Acked-by: Souptick Joarder > --- > arch/sh/mm/consistent.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c > index 792f361..fc8d235 100644 > --- a/arch/sh/mm/consistent.c > +++ b/arch/sh/mm/consistent.c > @@ -52,13 +52,12 @@ int __init platform_resource_setup_memory(struct platform_device *pdev, > if (!memsize) > return 0; > > - buf = dma_alloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL); > + buf = dma_zalloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL); > if (!buf) { > pr_warning("%s: unable to allocate memory\n", name); > return -ENOMEM; > } > > - memset(buf, 0, memsize); > > r->flags = IORESOURCE_MEM; > r->start = dma_handle; > -- > 2.7.4 >