Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp569555ybl; Wed, 14 Aug 2019 02:32:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqySlGI7WAf52sEGK2ArrKGmNi+R93GEcKf8FYAtAHiO0L27ORUkRBWPJN6iW2asQZf295Dt X-Received: by 2002:a63:8dc9:: with SMTP id z192mr37407396pgd.151.1565775176071; Wed, 14 Aug 2019 02:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565775176; cv=none; d=google.com; s=arc-20160816; b=hgTs6Bl7hNf+VCGeitiUqrG8ARUs6BtIifB7T0HHbE3UoItWre0d+bQ60iPTxOKyxU g+ll9+VQWRBQ1DFKqVxVhml2qAuRW+dKXANx04dXP99mbG7uwwd415XouwaS73hqEc+v lHeSpIZeFAPuO6Pv8q0lSaCKm4jGtOmyhb4yg8wbd0U1lRuU+7acqZJEZl4kaXsN1/bf KpzjY/iwXpK6PAvvP0r5rguCBGBWqOYAEiJQR6muX/0n0ODBXEiiBk83c3OoscvgAqWm BqNq7Ph1hLNeWCc2XRLQdrAqIqJCUk2ByM+1XUMEo2tdYTo4K/UUYO0NCv5HbiLIom1P yFGQ== 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; bh=wMvy8Ab385VnpfhpoCL2ty54WiU3FzsQ1ortdbnfmco=; b=HqVsAM+X+QPDe0ymZz77JhHeXC8dX434zjzq4Mudq1W4h7Wp4+wwc1/cbFj6CYVa4L QhMoVyAFpVJyXdjkOp7TD1GG7lEPfbaWcULpF3D9fUJPt7T0EyGlyPPe7KLWwoarAOuB XdwR/TnUOQOgNPuMB9Qk/bV1ZeTq6Sj1UNoXEt32y7T1IrYyDsrBtGTt9m/X3JnmYLdz rjB66uYnr0CF/gucNxy9VNx1K1Q+ByPAwhkl+O62PTbsOIEdTLwZc7gJqi5j2lFb1942 ZXfvR3qmvSt6jHq5qOk7/2E7IojYbsgXaWI9na/fTUVSzGRPC++Vmh+gHvxz1RuoUgpf YqNw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 185si10904438pfg.261.2019.08.14.02.32.39; Wed, 14 Aug 2019 02:32:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727273AbfHNJbV (ORCPT + 99 others); Wed, 14 Aug 2019 05:31:21 -0400 Received: from mail-wm1-f99.google.com ([209.85.128.99]:34908 "EHLO mail-wm1-f99.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbfHNJbU (ORCPT ); Wed, 14 Aug 2019 05:31:20 -0400 Received: by mail-wm1-f99.google.com with SMTP id l2so3832899wmg.0 for ; Wed, 14 Aug 2019 02:31:18 -0700 (PDT) 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=wMvy8Ab385VnpfhpoCL2ty54WiU3FzsQ1ortdbnfmco=; b=HhPmsNTAE8tfoMpLy32Jjl1Aq2v8IaxQThU3H4AbKhbrMvG8wuxPwmiAmmCKHPAZh7 OJiieGRSockjtWY8bNUYe3ngoXBt+iEauMOy1tjj+dIdjMQ8dNhz5+3WNJFWh3zdWP3G o2BsReDMvw1EBGS1APqSjEdy8Exh7qrna3gaC+KAWiwiDVuxu69Sl3K+ahYj1hvyUk0K FdpDi4/kB4aAiDhpNBjHO51/serrLZDDnZSHMNR0krbjQjGQUkIv1tDKjJcwW7+vpEb1 h5WfXnnGCm1KjYlH5czWjPT/ktWvPPaJWz4o+V/g6nKreodVQptc//wjWaqeTjBQgiS7 8Ahg== X-Gm-Message-State: APjAAAWSB7nRzz3VhahWeCdarIge5N5L/aChCjyvp0EzrDWuwCiVANbo AU9KKlY1dz0cBkrH0v+d9u+1uv+tjL4W1764wXNL1gIzcgouOGO0uE2veEk0jFNbtw== X-Received: by 2002:a1c:4d05:: with SMTP id o5mr7192816wmh.129.1565775078088; Wed, 14 Aug 2019 02:31:18 -0700 (PDT) Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk. [2a01:7e01::f03c:91ff:fed4:a3b6]) by smtp-relay.gmail.com with ESMTPS id q187sm28085wma.20.2019.08.14.02.31.17 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 14 Aug 2019 02:31:18 -0700 (PDT) X-Relaying-Domain: sirena.org.uk Received: from ypsilon.sirena.org.uk ([2001:470:1f1d:6b5::7]) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hxpcj-0004j0-N9; Wed, 14 Aug 2019 09:31:17 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 281932742B4F; Wed, 14 Aug 2019 10:31:17 +0100 (BST) Date: Wed, 14 Aug 2019 10:31:17 +0100 From: Mark Brown To: codekipper@gmail.com Cc: maxime.ripard@free-electrons.com, wens@csie.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, be17068@iperbole.bo.it Subject: Re: [PATCH v5 03/15] ASoC: sun4i-i2s: Correct divider calculations Message-ID: <20190814093117.GE4640@sirena.co.uk> References: <20190814060854.26345-1-codekipper@gmail.com> <20190814060854.26345-4-codekipper@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uCPdOCrL+PnN2Vxy" Content-Disposition: inline In-Reply-To: <20190814060854.26345-4-codekipper@gmail.com> X-Cookie: Bridge ahead. Pay troll. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --uCPdOCrL+PnN2Vxy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 14, 2019 at 08:08:42AM +0200, codekipper@gmail.com wrote: > + if (i2s->variant->has_fmt_set_lrck_period) > + bclk_div = sun4i_i2s_get_bclk_div(i2s, clk_rate / rate, > + word_size, > + sun8i_i2s_clk_div, > + ARRAY_SIZE(sun8i_i2s_clk_div)); > + else > + bclk_div = sun4i_i2s_get_bclk_div(i2s, oversample_rate, > + word_size, > + sun4i_i2s_bclk_div, > + ARRAY_SIZE(sun4i_i2s_bclk_div)); Are we sure there'll never be any new variants which would make a switch statement for the variant work better? --uCPdOCrL+PnN2Vxy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl1T1OQACgkQJNaLcl1U h9BePQf8ClHCMDk1/0p2riVMF+Ce3UctBx33fUNPHKz6fXoWHx15dRPn8E0YssEp QxGtyceUz/+pupjQSBf9ys8YmRmQNnJDMCWoPKcEYsTMQUC20p4lu2RJ2Hs6ZwZp GK78akZH7ZTALargNyecrfgGpMRhP8sZUxpCSWeviFQZp4W4SbafvXy1jv4jGz9q i4LfJo4I5I1K7oGjfmW6QWU01EZkYWDFPV/2ulZNPN9qnQk6SLBzE/WLJJQ5pg6z xSipsQlxBbboOT+6v/mfMovpO2qBSUTL3wzSRNJzANTc4BnZ+32IK1MpssbQ3EBC o4F3ZOw6kp4o8QdLfGAfvJ9lfbYyNg== =/pEP -----END PGP SIGNATURE----- --uCPdOCrL+PnN2Vxy--