From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 372D7C2D0A8 for ; Mon, 28 Sep 2020 04:37:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBD2723A05 for ; Mon, 28 Sep 2020 04:37:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725308AbgI1Ehu convert rfc822-to-8bit (ORCPT ); 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-Google-Smtp-Source: ABdhPJxsLcHNSGciOvIzLRl3ERq/ZW8D/V72dTOa0WLNO6ijKJNtqp3iDfGBoKx8WwqLjPY2HM9lOQ== 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: devicetree@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