Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2051203ybb; Sat, 11 Apr 2020 19:10:04 -0700 (PDT) X-Google-Smtp-Source: APiQypKov5g53U5PE1f22mRdKW8pZFtkglHQVKVsTd+Hf26il+Ihoz14vAYaXG+f/YjoBCc37s/s X-Received: by 2002:a37:457:: with SMTP id 84mr9143018qke.12.1586657404391; Sat, 11 Apr 2020 19:10:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586657404; cv=none; d=google.com; s=arc-20160816; b=je4EEH+RhaxdFoXSSmuzpznHREch+L3spfInF0nAW2YLhU6ezBIx/TpUHX42NOeygn hlJD/MFm0QSXyGS5WhJ44U8N+e9mz4SFF1dJLLX6ZMloPKEQZiw8KhkJl2W0VT977B67 27PcK/blAH77aFWj30Q7EB9x2qx/I5i17KSbV6k0PvB4w0LKwpBXg2AK+cDz1Sf/cUWO w23pZNnZzcUzJCfUIyXh+NixOcQ/gGJ1I9QGja2sNFd7U8aAGsIaAYYlr9FYAO2T4Quh YXMI0FQZcvSCAVQHLCiixaFZKhEI+QeJc9DxoSNIXolWNZjoLLO9IoNvIDGfgBI/6Fld tQKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2XTiPR3NjTU2y5mQ5J0Pv6fdfmC7aqoQXGxB8xurXAY=; b=fr5wgr4C+MAP7JLIUKzaFhEbNZ0ag4Hbzb9MUHMx1gWDuq44cyFHqIQjAwElxMS7m2 KI3PlHOiKbUC2CXmGsuNuKzC40puE5/QGujaOTCrBIBWOPIWluAJYhH27Y+nsDREmbta J54ATuraSkyH1O2NsWXlcuu7KGJEsdXwxj0VXQzOL3V7FGwYEq7OQi1XEb7sM8HqjemT +y20KiTzMHJ101WldGB6KHsryDvhTnsL9bzofr053zQuuae6sbDbMcC2gCAYI8wSI7uH 5f1Oty9BzSqe+xj8R0oUZMTugJg8hoNLbmVahEKYSCR4LaZj3QXslKCEMUdFIOwoW0qX fGuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lDpwEbYH; 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 h41si3577128qtk.45.2020.04.11.19.09.50; Sat, 11 Apr 2020 19:10:04 -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=lDpwEbYH; 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 S1726866AbgDLCIc (ORCPT + 99 others); Sat, 11 Apr 2020 22:08:32 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36674 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726155AbgDLCIc (ORCPT ); Sat, 11 Apr 2020 22:08:32 -0400 Received: by mail-pf1-f193.google.com with SMTP id n10so2945470pff.3; Sat, 11 Apr 2020 19:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2XTiPR3NjTU2y5mQ5J0Pv6fdfmC7aqoQXGxB8xurXAY=; b=lDpwEbYHC9at0O1/B5PbecUoT+1zLNbJJBOjARMz1vPiPAZBxvUrVH5hV342v8CaFt a+I5t0MMp3yKWm1/XhdBCF5fMcDcvldG3YzNzo+98u9VjmM3qkmwU2LEH1R5FVaSneic 7+y6w8ZmazEseq6ypQ+mk1+A5Yc9E34zL7pYLna9QbmUpef2c50w7XcQPXQXgPs9c84L YuZFpYEZ1xgZfskMHnj0FcLrXcK3dxQEc9RdlUv+5pH0JvRJHiFGrlGfuJwKfUeRJVPG xtDq/X8ZmLWtOjlWR5J0H7sDNy2S02+b8TZnC5h3QRrLCz80U5KzDaIU5uriOG0mmL0J KDVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2XTiPR3NjTU2y5mQ5J0Pv6fdfmC7aqoQXGxB8xurXAY=; b=OTJ/iBXtjWw8awhgZpkpWaRvRufMonYE+ODCHOCIZgcwvtcC/KdSRlkA/CURGxnQNY vR9aEfYRMx8UgYcvmrL33OOuAsI3/m35Q2Q5S61tLApwu9YzVtZawF8l9oanvruP6rmf bVWJ1aAjcrbMbKg+J5V13oucLy2geojs7PLKpHOmxbUp6W6Eqb7TyYsvCiNI80nAqMd7 c59aTMMG5JlC0Kn33PPHe6mE0ebE6EPw3eFSRCWr6kT3pKeYphqxOfkrPUrlxRilJ2A7 4T6PUXbNloXA6KzblscOfqukY5y9i+P3jyJJiWea6tu3CaARkghZUwBylZwiduJSPZ58 P2gQ== X-Gm-Message-State: AGi0PuZfZRk/YAj4KjF61ukPIbuJZUN7RP3JJFfK7Rq6IywAcPoSGGSI KvfJUSVgzGJ7aCKqnsJZrzQ= X-Received: by 2002:a62:cf82:: with SMTP id b124mr7362893pfg.124.1586657312126; Sat, 11 Apr 2020 19:08:32 -0700 (PDT) Received: from Asurada (c-73-162-191-63.hsd1.ca.comcast.net. [73.162.191.63]) by smtp.gmail.com with ESMTPSA id b16sm5148188pfb.71.2020.04.11.19.08.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Apr 2020 19:08:31 -0700 (PDT) Date: Sat, 11 Apr 2020 19:08:14 -0700 From: Nicolin Chen To: Shengjiu Wang Cc: Shengjiu Wang , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-ALSA , Timur Tabi , Xiubo Li , linuxppc-dev@lists.ozlabs.org, Takashi Iwai , Liam Girdwood , Rob Herring , Mark Brown , Fabio Estevam , linux-kernel Subject: Re: [PATCH v6 5/7] ASoC: fsl_asrc: Move common definition to fsl_asrc_common Message-ID: <20200412020814.GA5984@Asurada> References: <93531963f028aabf9176173de3c6038a200acb89.1585726761.git.shengjiu.wang@nxp.com> <20200406234819.GB20945@Asurada-Nvidia.nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 11, 2020 at 01:49:43PM +0800, Shengjiu Wang wrote: > > > diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c > > > index b15946e03380..5cf0468ce6e3 100644 > > > --- a/sound/soc/fsl/fsl_asrc_dma.c > > > +++ b/sound/soc/fsl/fsl_asrc_dma.c > > > > > @@ -311,11 +311,12 @@ static int fsl_asrc_dma_startup(struct snd_soc_component *component, > > > return ret; > > > } > > > > > > - pair = kzalloc(sizeof(struct fsl_asrc_pair), GFP_KERNEL); > > > + pair = kzalloc(sizeof(struct fsl_asrc_pair) + PAIR_PRIVAT_SIZE, GFP_KERNEL); > > > > If we only use the PAIR_PRIVATE_SIZE here, maybe we can put the > > define in this file too, rather than in the header file. > > > > And could fit 80 characters: > > > > + pair = kzalloc(sizeof(*pair) + PAIR_PRIVAT_SIZE, GFP_KERNEL); > I will use a function pointer > int (*get_pair_priv_size)(void) Since it's the size of pair or cts structure, could be just a size_t variable?