Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp539886rwd; Mon, 12 Jun 2023 18:22:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4XoeynkBiw8Wn1QKjJYc2gY+225sqCYB4wyNgOIBKSH/DqAF4GlNEPI0B2YEIY33rGbouP X-Received: by 2002:aa7:d449:0:b0:504:8014:1554 with SMTP id q9-20020aa7d449000000b0050480141554mr6537358edr.28.1686619358036; Mon, 12 Jun 2023 18:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686619358; cv=none; d=google.com; s=arc-20160816; b=fFe8Q1iEWEnQ2+8hQiG33zqrSZVkfe7leSJj0GkOpeIHLJQoW4XxYDm6rm/8TMX1QT AbRMKg789JcYvTS6sAwgobVuRH+9ZtpQ8kZ98cOLzJDC+ZLzFccPcxb+jiofjnWPLZ3Z wbn6ktUL4lt3ns3VemyVKWwDjpanfyiX+4HfOGmEbm17RZrbbSx2Fg9mEEv/ebpi2EWB VAE/hgemKmo6SsFM7AVD+y61di4y7qkcSFgoVNpnx9c6f/qwBME2JJzgKYEbJDfYbeJl 2Q2yJ8F4t4++4Cwm3ouHmB94Ad9yIWg+JvP12Wdi1Id/UxwV82NWVNU6z94gW6XMX3ut LkZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Bgse2RmmSKedQIBqqGcWB4yHTfxUKKJxQusL9JV1uAY=; b=Y64J5T/KPBkt8rO0go/wi2Tz324C64jKDfHPLfp+oqJSHTcX8qqxm0DQS6JbOmzkyx 0dcqtnm2PpVQd9OH/DFcUREZx7pw+u3e+jf+nbizQKHrw1RKLStgfcvbp7IeNnCpx9ik x5Fj449/hCT1Yr2XoMPk1w2/gwAsm5hgElD9sRwNS+EXWh4UoR41svqhA68gwVhaMnPj TVlC6xa2Sl507nOAc5zHQfsInjfN3Z8qvYNGpWF1W+Ra9AXkj6TRk37OIlRiuJi7BA99 rDbfPbpWcGO3K4qRamAqI2Frj4PYDBWc0ZhBjG1IP1eQSMkvxej6hyMp5Jv18I8Wp4Xs xmEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MDtbZq/Y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a50e603000000b005186d996d0bsi653015edm.376.2023.06.12.18.22.13; Mon, 12 Jun 2023 18:22:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MDtbZq/Y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S238635AbjFMBMJ (ORCPT + 99 others); Mon, 12 Jun 2023 21:12:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238109AbjFMBMH (ORCPT ); Mon, 12 Jun 2023 21:12:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A599101; Mon, 12 Jun 2023 18:12:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F404863079; Tue, 13 Jun 2023 01:12:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CE91C433EF; Tue, 13 Jun 2023 01:12:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686618722; bh=s2B8jsyrAMp70vnL8t+VU1TAoQczCjHuMAecRCqHfbs=; h=From:To:Cc:Subject:Date:From; b=MDtbZq/YIgU4w5Mjy34aMseasppY5x6FJ2bJ3b/DNb3cmDYOXij8PSXRLNTtAlTPz oA06kJovpjEY4Ob3igRKSNBni3AWzrLC0k79X9basD0M9Uqc3bJK1kxUgbBMskamkC 55sRnsgbYtCaOORxmCLwiP1+sbm3MNkSQYyyZKHWyqE4lL6Z2Zp0xPTlvkNw0sbKoS vP3WutOLeUdWFjxLFXYXuXHD4EMmlnO6uGfmapFQQirR/wS4No1G+FtTsFL7bnxdIO kcn4m0RWFdtuKa9L7yiNYU8/DxpxwKB7MqpUObwanJPxa9oEoSEInekRzPg3mYBwiK fSlhp9xn9aaKA== From: Stephen Boyd To: Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, Maxime Ripard , kernel test robot Subject: [PATCH] ASoC: tlv320aic32x4: pll: Remove impossible condition in clk_aic32x4_pll_determine_rate() Date: Mon, 12 Jun 2023 18:12:00 -0700 Message-ID: <20230613011201.1166753-1-sboyd@kernel.org> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Smatch warns: sound/soc/codecs/tlv320aic32x4-clk.c:219 clk_aic32x4_pll_determine_rate() warn: unsigned 'rate' is never less than zero. Cc: Maxime Ripard Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306101217.08CRVGcK-lkp@intel.com/ Fixes: 25d43ec352ea ("ASoC: tlv320aic32x4: pll: Switch to determine_rate") Signed-off-by: Stephen Boyd --- sound/soc/codecs/tlv320aic32x4-clk.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/tlv320aic32x4-clk.c b/sound/soc/codecs/tlv320aic32x4-clk.c index a7ec501b4c69..c116e82f712d 100644 --- a/sound/soc/codecs/tlv320aic32x4-clk.c +++ b/sound/soc/codecs/tlv320aic32x4-clk.c @@ -208,18 +208,14 @@ static int clk_aic32x4_pll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { struct clk_aic32x4_pll_muldiv settings; - unsigned long rate; int ret; ret = clk_aic32x4_pll_calc_muldiv(&settings, req->rate, req->best_parent_rate); if (ret < 0) return -EINVAL; - rate = clk_aic32x4_pll_calc_rate(&settings, req->best_parent_rate); - if (rate < 0) - return rate; + req->rate = clk_aic32x4_pll_calc_rate(&settings, req->best_parent_rate); - req->rate = rate; return 0; } -- https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git