Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4418354ybb; Tue, 14 Apr 2020 06:59:59 -0700 (PDT) X-Google-Smtp-Source: APiQypIh1urUk2F5gQMIdESjm1DufKg9x50cbBxTuz5VsrGI6zei7Q97j29oPF6QUCU9ksLZWVVV X-Received: by 2002:a17:906:4317:: with SMTP id j23mr159028ejm.377.1586872799460; Tue, 14 Apr 2020 06:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586872799; cv=none; d=google.com; s=arc-20160816; b=ktTtBXpX470CZAFdoSbSeqBZwQ6RzRJ+Iu9aEHPlEY6l2ZJ6cGjRqbLf5WrJJFepTe QIembJldEjRYK12Kfk+9I4QgpQ/OwvnjIGjO4H0E6VRx7V0MJ3x7Tk2WsdmhrssFb3HY KnGtQYClfOkdevupcyqCUP6xCBUpMgzqcael+dzuo++osl0dsLHreWVujbJNX/HveHsP 66J34YSRyJY/m8wckMdg93W6IbJcih+bS2zEhOONr5SM/McPJOWjwgJIbNCAauDoUCQT 3NWvbnH22jHNa0pP22Ojv7Jt81y97pUELx4sj89xbRu4rg5GNAnBZ1Pta9Xu6ZC8TosO RU4A== 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=bmrBJGYvPULTYsXID1n2ssFRwyCJcPGlCp+ffDZ2ue8=; b=Oy2QCqk5BMtgfj4YHXoG6Yw689m2FnYu9oDdqWkiu7FI2VgC1aFHnqakVRjCP7tYpM rUopObErnMuxrqu4RQ4cVZ5+JRwWe9XblejST+OBw8YLXJ8mw8Ykm0lU+6Tc4/u5dDYL 8ynBg4rRh7Rry/xMPl9D7+w+PjKI4Z1GQSgQSWWwxNIymCxoQt2r6wjFBSYBUrPUPH5p o31ftj9tOSS/xdUfOYBx3lOWFmGy7LOfmx3ULj5DZCpMpgLOA8w6IWA7SfOXB3kXwykb jn+I0QP3reHKxqj/2RnJpYVQcMoYBHI4ZLs2Rwxx4kRFC0LSJOc+okcsFKd6wLqzYxNb 8uVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l1z2pTrK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id dn10si6481477ejc.357.2020.04.14.06.59.33; Tue, 14 Apr 2020 06:59:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l1z2pTrK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2404343AbgDNDAM (ORCPT + 99 others); Mon, 13 Apr 2020 23:00:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2404224AbgDNDAL (ORCPT ); Mon, 13 Apr 2020 23:00:11 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57CD7C0A3BDC; Mon, 13 Apr 2020 20:00:10 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id e16so4393534pjp.1; Mon, 13 Apr 2020 20:00:10 -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=bmrBJGYvPULTYsXID1n2ssFRwyCJcPGlCp+ffDZ2ue8=; b=l1z2pTrKK/Z24bQCWju9hYO5K6LvWpD5DCoSXiSBLwZQZhhqLNJWoTKQgkoRKDgqvS fGfrn44Syk3yqgAQT+0OHNxD38qhIvqRmOcHX2AIf/pJBV9I4jsBWyuIigF4kB57t1F5 kkNWOJUdpFxyY8Z8j1+sJh7FDdYpGVtUV1tG0X0B1BFMhGwROxgCbFiuwXhyYrcC6NU+ bquTjcpxjVMjaVjEnodWHqImGRm0YaH9oPuWfSFC4fMFcoSTo3Qd3dATP64+4irVrKYk Qr6a18t9b/XMXEruEs0P1w1FaiNO+ZI9ha7UQIbZWSfK0rRfKPOVy3b15IvbvjWy0LOA 96ew== 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=bmrBJGYvPULTYsXID1n2ssFRwyCJcPGlCp+ffDZ2ue8=; b=aiRFvPCP3sJPbv5a/4z7cKwJxGq8TCHRgqjkZ6lp/LzPIAxWY+gD1wNxYkkWrPV/n4 sPqe/5q/lW4ivB4Tuo6yxkJvznvs/3FcxGQ8OO0sA2FFx9CtL+fhdrf3ncozryFt7joY NCRmcRGD3Xeno/wmNgEM4zSuxYd+pTaD8dJMfAp75oGn2CX8FuA2hFQxvlxKWXWUUsRq mts7xlAMzxCsHABFtfRwcUXsJTqurMScZr+1ynGV5VchRXIy2fF4olDZeUb+XlSTHKnY lTGJ639CGh0rGY24XpVvz6nmM6VKnD/yJT0vbHOAyJMEARI58aJurRrrtx212WascgrD 8IIg== X-Gm-Message-State: AGi0PubWfzxle1PK5kAGMFyl84nuJZth1XR7c4uYB54SLEOBMSaI8mQo mTF9kM/O1OBSWXNiJK0a0cY= X-Received: by 2002:a17:90a:6043:: with SMTP id h3mr6406198pjm.69.1586833209564; Mon, 13 Apr 2020 20:00:09 -0700 (PDT) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id c84sm1464971pfb.153.2020.04.13.20.00.08 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Apr 2020 20:00:09 -0700 (PDT) Date: Mon, 13 Apr 2020 20:00:17 -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 v7 5/7] ASoC: fsl_asrc: Move common definition to fsl_asrc_common Message-ID: <20200414030017.GA10719@Asurada-Nvidia.nvidia.com> References: <6d2bed91bcdbc3f75a9d12ac4ebf6c34c9bb9c3f.1586747728.git.shengjiu.wang@nxp.com> <20200414020748.GB10195@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.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 14, 2020 at 10:21:29AM +0800, Shengjiu Wang wrote: > On Tue, Apr 14, 2020 at 10:09 AM Nicolin Chen wrote: > > > > On Tue, Apr 14, 2020 at 08:43:07AM +0800, Shengjiu Wang wrote: > > > There is a new ASRC included in i.MX serial platform, there > > > are some common definition can be shared with each other. > > > So move the common definition to a separate header file. > > > > > > And add fsl_asrc_pair_priv and fsl_asrc_priv for > > > the variable specific for the module, which can be used > > > internally. > > > > > > Signed-off-by: Shengjiu Wang > > > > > diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c > > > +static size_t fsl_asrc_get_pair_priv_size(void) > > > +{ > > > + return sizeof(struct fsl_asrc_pair_priv); > > > +} > > > > Perhaps we haven't understood completely each other's point. > > > > Yet, would the following change work? > > Should work, almost same Function call involving branch instruction may fail CPU's branch prediction and hurt performance, depending on the CPU arch. If a variable simply does the job, we should avoid doing that. > or do you want me to use variable to replace function pointer? Yes. And please add my ack once you change it as the reset LGTM: Acked-by: Nicolin Chen