Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2760721pxk; Sun, 27 Sep 2020 21:39:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvKgWudXEHi87GeeUcNyiSj0PJuqBQOTlXCWK5J8wMtTDRxnEyc/8WN9HvwKecC3o6TrK1 X-Received: by 2002:aa7:d815:: with SMTP id v21mr13987835edq.56.1601267950135; Sun, 27 Sep 2020 21:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601267950; cv=none; d=google.com; s=arc-20160816; b=dul9JZWQ5uLLSPSrWaR+BssKzWbEHCuQBXTJMI7CUxmJNKXHw17WnwrPWLo8N2m1vK YsFd3iisoWN8udgv5eDk1Uip10WWPjRbhG+OoyH4DzF1MRZFvrK10SBPM55/hGkl4YeM wzfho6n/pzws/AboJ3+/HzuJcAX2ed9WgTCM3Esg6dzQCREDamh0MUwvQwPNOcQ4VMIj TVHZ7SB4NA+NybUxDJcjsaRu8wwqwh6/xOJc1Jf0pltp40hYzSDWLe34qYKaMBJEM8nu TOvXyeswV0pUC3bpZjWHATxraLZdQq18ywbfc+jVU/pvp0JJyAV1ShsOYN0FN66tEczP Mjdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=FcsztqGvWXXPijS/TdV/pik5UG80DOGAXkcRHFCdmwY=; b=f8aUARy2x2/oEHNyBGaKw+a3Cft5v8lW6jNmsBDIxzaqX5Yelf1GV+KdYPuJw3T9Lv KciCyPFAXDED/mK+EievDe91RDXe81NEWlA4Pem3RR2OTNX0BTYVRmgYZCoxcGhsiEOr o7vPx9Y0aA585lek9pxaZbE90Ib9hvmODUtCWF4LcdfCAIkRYkYI2XYk7qQjPsDTRvOE OSZAyW45Gae/N6YqrVQfCKxLI1X3lWSzr1FWR1B1rHMlS/6cTc1lV0yuNcZH8q7bL75G qooexIGkt5pwSabofAw5inVx5iqJFWpSXvV3GiGATbvy8EpsLF17tyKKD+F03DuZGlcm bLIQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h25si7118296edq.433.2020.09.27.21.38.47; Sun, 27 Sep 2020 21:39:10 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726396AbgI1Ehu convert rfc822-to-8bit (ORCPT + 99 others); Mon, 28 Sep 2020 00:37:50 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:38511 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725294AbgI1Ehu (ORCPT ); Mon, 28 Sep 2020 00:37:50 -0400 Received: by mail-lf1-f66.google.com with SMTP id y11so9514279lfl.5; Sun, 27 Sep 2020 21:37:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=PmQd7B2UV3XNWq1r+fcYwXvafyTylCt2+L6Qyv0W31k=; b=FO5aZmNBk+cQ1mGYNq/3guE0HdnXaiCEXbQb2eUH9KJ0i5JNwFJZYNy6TtR9ShcB2H XErXACZ1AVBTagobY8sd0WR4aTcgWPJeqtrJOlPmpVkHQt0IpsA2ALJFZMJGHUFefHWg /rkCyDLBs5qt6UDFBjsTcGJmX6jC9SddOqZOSD26yN/WMihR8k/QIhyA3k6iYzpfQI5n e326fcd2PhTpUfKa+t5Kaok21EwgZ/i5CMQEtRJhFusQeMWtAPkelIEvhp91RsY0Zp74 s0XQsOTr9QkQy/PRK3EU6iGMelRuGcxBMO40eCn0KUomjbG+cWPxO3t3UsaZckWLdegN LX/g== X-Gm-Message-State: AOAM532jSEXdXIUVD4XaMeJbfxJ9a/HLajomxQZVc8iP7UJqeeV5GNp0 pzq+kUOygj/C5q6S//LiCF26jD1ZLokrQw== X-Received: by 2002:a19:942:: with SMTP id 63mr3493556lfj.23.1601267867358; Sun, 27 Sep 2020 21:37:47 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id y5sm2713160lff.60.2020.09.27.21.37.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Sep 2020 21:37:46 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id q8so9504709lfb.6; Sun, 27 Sep 2020 21:37:46 -0700 (PDT) X-Received: by 2002:a19:c6c8:: with SMTP id w191mr2875289lff.348.1601267866731; Sun, 27 Sep 2020 21:37:46 -0700 (PDT) MIME-Version: 1.0 References: <20200927192912.46323-1-peron.clem@gmail.com> <20200927192912.46323-4-peron.clem@gmail.com> In-Reply-To: <20200927192912.46323-4-peron.clem@gmail.com> From: Chen-Yu Tsai Date: Mon, 28 Sep 2020 12:37:35 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linux-sunxi] [PATCH v5 03/20] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit To: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= Cc: Maxime Ripard , Rob Herring , Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , Linux-ALSA , devicetree , linux-arm-kernel , linux-kernel , linux-sunxi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 28, 2020 at 3:29 AM Clément Péron 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. > > Replace this with a simpler switch case. > > 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. > > Signed-off-by: Clément Péron Fixes: 619c15f7fac9 ("ASoC: sun4i-i2s: Change SR and WSS computation") Reviewed-by: Chen-Yu Tsai