Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp223058pxb; Mon, 8 Nov 2021 12:32:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJypjg8UlDmDrzjwMNYUuPPXJDc35p4+jWOV3hcENvETJPrFIPyt4Lnq+4V7Z7weNg/S+Fh+ X-Received: by 2002:a17:906:6993:: with SMTP id i19mr2543486ejr.136.1636403556613; Mon, 08 Nov 2021 12:32:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636403556; cv=none; d=google.com; s=arc-20160816; b=A+jVjbAb3JRZF0yFburdf7QEnSQ/YZWPSsJcTTLDfmmCmL5/iO/Rok9qW7TdyhVXGA otTN4h1icTkNIvZD3/1UfMgAQVJsZHwcnsXbU5We1s2tto8VnalkaGUeuzU5MxvPvqZi ahlRLf2hF4LWYzBjqSAf0i61JdJ9i1bv1N/uyTDlzIopTKB8Nqd0vm/tlQtTrEOIvtvM bpSwfPpl3HmtmZ2bfQB1az8uWRvYEpMsXEVkuQxrkTqZvqarNSb0LEyl0Ot0wNSDM+fS MWsQ2UnCXsObfsP7tgtW772/AmpeDUymtt00LwjZYe3DrXzMwCxrYEm1lYDodfHAK5Sb Ir5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ux6aWH5YihJGcF1A0bKlW4iHZCq3kZiY4HkGCaycJfk=; b=Uqbfrrmyp8MaHuiEVJfCnzbM28scvX1r0geXq3RfFcUwujcZLFMRtwzbkrChw7Enea zk+QNNPqjM+s0FXN3ByKIzKNn3UjDkaZXLilkfGAVcXQggOxa5SNfLZRckwLf3BLRhFq 63QGA/fQOKlpZ18MO/6d1okd3AHqt5ZvItymCND0knjiRrlz6AvYTlvd+B8RE0esld9w +NP2ZJuQN1qzYwLmO/wIb1o2M0Qj6EjOrCZhHp5kfqpL9Kxnm8dSWeXClJDc31/AAsWS ZlRyrDURRFHt9iMgl+FqEuj2s7mMpiMK/C0ylGb8hjrX6CjHMlbzoJ3ow0Xa777d842s 8n7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qDbi4k8q; spf=pass (google.com: 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ne27si37423579ejc.39.2021.11.08.12.32.12; Mon, 08 Nov 2021 12:32:36 -0800 (PST) Received-SPF: pass (google.com: 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=@kernel.org header.s=k20201202 header.b=qDbi4k8q; spf=pass (google.com: 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239463AbhKHQSx (ORCPT + 99 others); Mon, 8 Nov 2021 11:18:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:58658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236829AbhKHQSx (ORCPT ); Mon, 8 Nov 2021 11:18:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 91AAF61360; Mon, 8 Nov 2021 16:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636388168; bh=ZViGquAcSREf+WCVyvRS1/EQ7NWLBVKUIUxVQpvu/Vk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qDbi4k8q9+LR+6Xqi95afw3Ov2XCJtgQsoPXbqWGwgqOO6qNkaFhBAl0mvjhMmCUc BIcFHDyB5TiDpg1vGgCQ7hfumwZCLduUiFoBOWwJa67ftfBNYrveblFgfDRkuqVWrj o9qJQiXy4gqxwoCDF2AQUvtXpeVlQTJbSP3ychXOQeQg/YhtD6Irk2DGPcvxh6j9OB HsZ+l8XDu+dG9hs7vV6m0+3RpxH36DzeEMzxZk6F3krj5wp77OKAHG6pvchC+qywhv W6ESPfwY1BKiFDk8KzELS3xm/wqc+0iyR6Ey3SWiPKPOx492ubZEYx41nQZCbBprrD Y0L0GtuSI1aBQ== Date: Mon, 8 Nov 2021 16:16:03 +0000 From: Mark Brown To: Sameer Pujar Cc: Jaroslav Kysela , Takashi Iwai , lgirdwood@gmail.com, tiwai@suse.com, thierry.reding@gmail.com, jonathanh@nvidia.com, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 01/10] ASoC: tegra: Fix kcontrol put callback in ADMAIF Message-ID: References: <1635947547-24391-1-git-send-email-spujar@nvidia.com> <1635947547-24391-2-git-send-email-spujar@nvidia.com> <0e2d89ca-84e3-9427-5ce1-c0224d4db089@perex.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hSCBKJ2X0AP7XGaR" Content-Disposition: inline In-Reply-To: X-Cookie: Kleeneness is next to Godelness. Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --hSCBKJ2X0AP7XGaR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 08, 2021 at 09:33:25PM +0530, Sameer Pujar wrote: > With separate callbacks, the string checks can be removed. However for most > of the controls, the common part is minimal. So there would be multiple > independent small functions depending on the number of controls and the > local variables are duplicated that many times. Would there be any concern > on the space these local variables take? One pair of callbacks for a control > may look like this. ... > Looks like having separate callbacks make it look more cleaner. If this > appears fine, I can send next revision. Looks fine. It'll result in more code but hopefully they should be smaller, especially if you're using substrings rather than the full control name to identify the control and we need to store all them separately to the copy used to identify the control to userspace (I didn't go check). --hSCBKJ2X0AP7XGaR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmGJTUIACgkQJNaLcl1U h9A7OAf/crR93uqsfMvOX0QdbKKWE3VrliVv3O3XEdi19d7/wUTGNbdqm0547n4L oyi9HGmFL/pXYpGncL5V+UIqWRftYJ9oy2GIYxRe/eH6RFGM0vthFI+Z8ZJw3D+i Rtx7WX9gFANilArMSXwILu4K8CsAeoDF8Tibjh4K1+k5IcO2tNcTnSNA5xlT7OVc uzpDDAe9c6c1X0mP2D42MoHJ4RtEcKvue0GxpN+/PKkCAgmpGMsQb+RQ25n9npHv 8w7lMDaddhi2MQMuBPYDmAHboFkhsCVyVJFKJOPgMzF55SC17iDFHW6QyxT4FimW 0p60A9ZtmDNkiKXjOo2tj3JEpqQmgw== =Xs1h -----END PGP SIGNATURE----- --hSCBKJ2X0AP7XGaR--