Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp542858pxx; Wed, 28 Oct 2020 10:41:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0RdMrcc2rG7ffZ7m0RZa+KVRhELGECKP0GwNYvIiNYg9A7D9/BDgwhV+5X+OY7yCIyrZ1 X-Received: by 2002:a17:906:4a03:: with SMTP id w3mr189605eju.15.1603906882953; Wed, 28 Oct 2020 10:41:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603906882; cv=none; d=google.com; s=arc-20160816; b=f9i3M2WRlLQU4LIS86G4+5+8Ss9plWtagHmJ9K4ZHmsDY90fOVwshPQCtP86kPG3J6 ZCYVjzkb8vaGgoDrhCLULdvfkcpJPmdz4TD647SlgOhs+UPfB/uSageNLBE3u0pU4gm7 jKAp6C6WEEAhH+pv84Sp7NDxYd22ZEOVavAs/JoOyVcyHZ80r15qHCVFRytfAaQd7PT+ QHziimjKB2+1PPpoRrttGK7/jy1BXF5qb1tSnUGGFt46oLQNxPaHyaoGSPHsu+gmOpvz 19KVb2cHgKbYNtCIinpAoifbXHVs4eZ33UGcktpl+X33/lT32JQvsHBVEFFjenFtmXTG KQSQ== 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 :dkim-signature; bh=o0QZYLWc2DJfF5NxyW7s/sWWeb3sdM3P9zlIU41d1fc=; b=DiDduEkPojcOkqbt0sWvv/rSuEl9xfS9k2MqmAC/YjLS4GAtZxtSN5qdNjh2n2/zuo S2WZWH+qbYGiJc1mAF3N+UlckBfOqhJkC3NzGC30N6hfeSnkjqt7Y5ATICaY+Gmz0lfR z5pKIf9FdosHpNqBcHrPQzF48svipRf/GwsEmePe6fMTMJZnSAst34Bo7uRqi/rifD8i 8gv0eCBAorHfFSLLEvQSzhkRevkhwli3dXu0q/s87TooHgFsP3XBexhTHU+vi3eI0zyc aWpCcqROT06DuiZK677dF6l4QS8FVLishWF4TSjyIFm67tewE9MaU9/6dsdYmy7HAjz9 2FEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=gtgMuXDG; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=EF1KDrT1; 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=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d23si10484edy.397.2020.10.28.10.41.00; Wed, 28 Oct 2020 10:41:22 -0700 (PDT) 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=@cerno.tech header.s=fm1 header.b=gtgMuXDG; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=EF1KDrT1; 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=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1822559AbgJ0RuY (ORCPT + 99 others); Tue, 27 Oct 2020 13:50:24 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:38303 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1822544AbgJ0RuT (ORCPT ); Tue, 27 Oct 2020 13:50:19 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 00712580429; Tue, 27 Oct 2020 13:50:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 27 Oct 2020 13:50:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=o0QZYLWc2DJfF5NxyW7s/sWWeb3 sdM3P9zlIU41d1fc=; b=gtgMuXDGFAqFV5I7iH5evdN/pbtYoM/mtLK7uiphFmh 33+qh/K2PI9c5o1uFJa5Phw2uTxzh8gooBNm8Q4FP31SoJAczVcBKIfKckFdTtEp UKzPSuCakH/GqtXAkgHS2Ldz1ciKiRmnVq9Saf/0ej/sVVQ2kDKdQe2z/khfr5OI Y7j6zLCt8hlnrOTkB30+Hh4bJTIjeVeNSdclssh9cz+CYb1GwKNT9HUhJn5k7EZJ w5LdfJ1DvqX9IAsdiSqO+EkfkatbpBb9O0qxQdReHuHRLkEjI1TTtJ/LDgG6iw3x uSjXtAZZ5v7xYwna1WCmJVNQIStP5FSU60BbGpj7Q/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=o0QZYL Wc2DJfF5NxyW7s/sWWeb3sdM3P9zlIU41d1fc=; b=EF1KDrT1QDa64D1eW2tN+A kA9JNmvZLB5fEWVVTPMGuSYCoeK6jSu+OVxFYiCaBK/G0Q0dqG1hM3OKqjeOFE1+ 48CNWZnDlpxqiHcnfyGfufTTGoANR/ECCW1faS+HtV35a/W3nA+L03aFEnZ30ojY 59EXl6ctSD6Gp1P1gZGiOYMMFxIpU0392mR1shQBTfP6Gkd6WWZz/NQlq9mKFv43 LtWn9cffbT5wwwGbWSB41B1x6c6cuXPVWVQhM7fa5xNHRpQAOLdt/jre1lvrlwZ5 zM6gHXJoupVuCg1Zc9ivYCdn/JC2glbGqnqhIWM5hzKxIOyU5VM24YRhJAOWwXig == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkeelgddutdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddunecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepuddvudfhkeekhefgffetffelgffftdehffduffegveetffehueeivddvjedv gfevnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgepvdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 7B7E93280064; Tue, 27 Oct 2020 13:50:17 -0400 (EDT) Date: Tue, 27 Oct 2020 18:50:16 +0100 From: Maxime Ripard To: =?utf-8?B?Q2zDqW1lbnQgUMOpcm9u?= Cc: Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v8 03/14] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit Message-ID: <20201027175016.ffx7lokjbscczvox@gilmour.lan> References: <20201026185239.379417-1-peron.clem@gmail.com> <20201026185239.379417-4-peron.clem@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n3kf2kspvasr6u7d" Content-Disposition: inline In-Reply-To: <20201026185239.379417-4-peron.clem@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --n3kf2kspvasr6u7d Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 26, 2020 at 07:52:28PM +0100, Cl=E9ment P=E9ron wrote: > We are actually using a complex formula to just return a bunch of > simple values. Also this formula is wrong for sun4i when calling > get_wss() the function return 4 instead of 3. >=20 > Replace this with a simpler switch case. >=20 > Also drop the i2s params which is unused and return a simple int as > returning an error code could be out of range for an s8 and there is > no optim to return a s8 here. >=20 > Fixes: 619c15f7fac9 ("ASoC: sun4i-i2s: Change SR and WSS computation") > Reviewed-by: Chen-Yu Tsai > Signed-off-by: Cl=E9ment P=E9ron Acked-by: Maxime Ripard Maxime --n3kf2kspvasr6u7d Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX5hd2AAKCRDj7w1vZxhR xVSBAQDIaorGTe6Rg23npM5DFosGwhRlWf76CAmWy54Djr4NLAD8Cg2M6OPV5jLz SpZ7bjMKgmFzWBBZXLpQO/+25PAGjwU= =ej0g -----END PGP SIGNATURE----- --n3kf2kspvasr6u7d--