Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3064489ybd; Fri, 28 Jun 2019 02:12:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzutF0GGF8kLjkdwNVn6Cp30TT1RVs7ZhPHPqfJ+IrxIh0r/cFeLuLro7c/502wYT6m9p0Z X-Received: by 2002:a17:90a:21cc:: with SMTP id q70mr12220650pjc.56.1561713120915; Fri, 28 Jun 2019 02:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561713120; cv=none; d=google.com; s=arc-20160816; b=aay1peOcQhp/u5RqDKSNP5UD3NBHjuCM+5GkFzJYxVbpJTqxvcrfdL7QsE3JNnWEBL nayLLk936gpSo8BJIEWgCYZiIrpwe5nWubuAyQVm+Se9y77H4DjR5o4D7ISPDd8f1RRe SccGpLwLMfSccSjH25Zud+ZL86k6Z2FMa+Xlt1uTtPVNe+o5Pdn1SFMZQoLhWCojkdvV LyWhTezU7Iu4rJ9OwdjDaZbhBQFv5tmnq+fjqK4VW/Z+091jEktDVCVqYAqBdqf9pNmX uFju3ddr4u8nfCuIyL4XizcTNIF6eIYye36wEDZiBaJJgCciq6d7Sb2dsKxPXYLGQtom +V2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=NYW6PlEeaH367Jvr1ZMSoo3Aj5m51ktezngndfggtvY=; b=LtBrgYIAt6wWtOUd4ln5TYowxXada9PN7pdswI+LIrDrqu8tSLR2WBViXJkNWzculu BFZVTlgcmbi8le1P7CIYulcFo/9V+TmXPmdRbptdh6bmmUC1z5CcQvHfGX/5oaB7bxTl bsPe22fEyL1gole1lFGRJqEqGRde5yScxgf6LbVArV1aRM/LslRQEuOR8Nr7PkSDeFDV /PdV6rsU10LNscdDg2xi7DlznRvQZltRxioE6VhmGD/CuRceaS5J8Dlsc5fWPEVUft3a +7tequcMuLlu1nEyd7H+hI2Z6Y9ILhLlFvM+cIXmPDxTmIxf5qanOdOvHxhEumhqUUzM 7C4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=StQri7Ff; 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 y5si1849554pfq.181.2019.06.28.02.11.45; Fri, 28 Jun 2019 02:12:00 -0700 (PDT) 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=StQri7Ff; 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 S1726601AbfF1JLU (ORCPT + 99 others); Fri, 28 Jun 2019 05:11:20 -0400 Received: from mail-yw1-f66.google.com ([209.85.161.66]:34125 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726431AbfF1JLU (ORCPT ); Fri, 28 Jun 2019 05:11:20 -0400 Received: by mail-yw1-f66.google.com with SMTP id q128so3185383ywc.1 for ; Fri, 28 Jun 2019 02:11:20 -0700 (PDT) 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:content-transfer-encoding; bh=NYW6PlEeaH367Jvr1ZMSoo3Aj5m51ktezngndfggtvY=; b=StQri7FfBnbBGEumveJwe5nkZAxrnsl671ui5e4oGfnTsl6m3afqK8KoJktb7l92/5 npAV5CxaY7ELNtmAqoi55qQvXqnPFo4n9uX1BUNUb4t/dwYtyeQ/M7EXSrB/v0zRegJE P8e0j9feRAtEl3LJ8zHZ7pplU8UWCoy5zEZKLE3lZFonv0QcEwAQCmBlTUpcPzCpORaU KWr3K/480ZFGenmaWVLmNgEVOZh9JAXlLCQJS/VVNfNlmf9I31Ygk4UJv7rV/7N3txa1 fb3GUv4xRMJn7E6lc58vZ0lrTIQBrPETcl9F7RauB7UNsjwvdYHz6nVtH4zpR7o3zpzr JYQQ== 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:content-transfer-encoding; bh=NYW6PlEeaH367Jvr1ZMSoo3Aj5m51ktezngndfggtvY=; b=YjkJK3PtQ2v3lIuDuFW35AeTvdmLA01uJATrxRAu5GAf5qLjfNpyAIrlxMDkOW5BA+ 3luybe0cUKMUxpbXESOsJdBDNR8pj/oPdgWjK465XibjjNnzAWdn9KAu/D5pt4LMzyph YgkQR6qCet1HUwCn24qSPiepf93nGDRKPVDptnsuMod/tB3cwXVJW4cLmNjtFKZNFzP9 jqEa/YBBG0DLrtIRYyI5MINf2ptONveSGJ0YFzCVeuudaeAq+jnPGhb5fIvd8DDscKgL 0l3JtfP3sRPRev2LQRFpRn+gqJvqNJPix7NqmSZy9pP4aj0IIAT1iqR/Hzc8/Z+G0VvO 7Zxg== X-Gm-Message-State: APjAAAVCTTQlvGO6QT7ESTDCJCdefLQLvz6ePjRxMWF3DQI4uc93C/Hd jl7Kl2kXEWXxADqBL3r99udAa7Np0VMQxQMBz/E= X-Received: by 2002:a0d:e1d7:: with SMTP id k206mr5230972ywe.229.1561713079518; Fri, 28 Jun 2019 02:11:19 -0700 (PDT) MIME-Version: 1.0 References: <20190628025055.16242-1-huangfq.daxian@gmail.com> <83108dee-72f7-e56f-95f6-26162c9a0ccc@c-s.fr> In-Reply-To: <83108dee-72f7-e56f-95f6-26162c9a0ccc@c-s.fr> From: Fuqian Huang Date: Fri, 28 Jun 2019 17:11:08 +0800 Message-ID: Subject: Re: [PATCH v2 27/27] sound: ppc: remove unneeded memset after dma_alloc_coherent To: Christophe Leroy Cc: Rob Herring , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Jaroslav Kysela , Richard Fontana , Paul Mackerras , Thomas Gleixner , linuxppc-dev@lists.ozlabs.org, Allison Randal Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The merge commit log tells (dma-mapping: zero memory returned from dma_alloc_* and deprecating the dma_zalloc_coherent). I used this commit just want to say that dma_alloc_coherent has zeroed the allocated memory. Sorry for this mistake. Maybe this commit 518a2f1925c3("dma-mapping: zero memory returned from dma_alloc_*") is correct. Christophe Leroy =E6=96=BC 2019=E5=B9=B46=E6=9C= =8828=E6=97=A5=E9=80=B1=E4=BA=94 =E4=B8=8B=E5=8D=884:59=E5=AF=AB=E9=81=93= =EF=BC=9A > > > > Le 28/06/2019 =C3=A0 04:50, Fuqian Huang a =C3=A9crit : > > In commit af7ddd8a627c > > ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma= -mapping"), > > dma_alloc_coherent has already zeroed the memory. > > So memset is not needed. > > You are refering to a merge commit, is that correct ? > > I can't see anything related in that commit, can you please pinpoint it ? > > As far as I can see, on powerpc the memory has always been zeroized > (since 2005 at least). > > Christophe > > > > > Signed-off-by: Fuqian Huang > > --- > > sound/ppc/pmac.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c > > index 1b11e53f6a62..1ab12f4f8631 100644 > > --- a/sound/ppc/pmac.c > > +++ b/sound/ppc/pmac.c > > @@ -56,7 +56,6 @@ static int snd_pmac_dbdma_alloc(struct snd_pmac *chip= , struct pmac_dbdma *rec, i > > if (rec->space =3D=3D NULL) > > return -ENOMEM; > > rec->size =3D size; > > - memset(rec->space, 0, rsize); > > rec->cmds =3D (void __iomem *)DBDMA_ALIGN(rec->space); > > rec->addr =3D rec->dma_base + (unsigned long)((char *)rec->cmds -= (char *)rec->space); > > > >