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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19674C54E76 for ; Sat, 18 Nov 2023 22:21:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0q6gDXb4QSnO39mKnAhQOjsFnvA8mnpFexZMrlCHthY=; b=AzYjxDrrsFB3L2 W2W0uNyfzMf3NKSUBsl9Af5chUf9uVEkaSOABezXBiZYN5xrTQ7c2DY5v3m2y/yySbJ0uj3WDJhT9 6u/BKQjjwZUrcI33oUDzYz7NGs0M7S+GnAhcqgluBQlOqtTDHhmatASTc+RpiyIw3XZ20BQP7p14g HmpavAy7NdyR77498kZ9veUXU9phPoIqTZmu29KmBzzfEl7xhk4kRp9bkDv4fOLwareHbtj+vlpnJ c9Gh8qR4tc6j9/rGP94EKKTrU09mOq7kbs9HvhGzNksXjBQMJ6RMa9sJJ1ZEY2qvZmq6zCRv4bdvc cIS/frtNWGaDF750+p9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r4Tgm-009Dbg-2k; Sat, 18 Nov 2023 22:21:20 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r4Tgj-009DbC-2j for linux-arm-kernel@lists.infradead.org; Sat, 18 Nov 2023 22:21:19 +0000 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9fd0059a967so1154066b.1 for ; Sat, 18 Nov 2023 14:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700346076; x=1700950876; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=B119josK+jVs2ecxhPEL/ZG53Ca65uQoC2aDhpf/ABs=; b=bZNjhgtIxOoYM/14gPeQ1I+WBrlXRwaZLphf+H4U91UNjp/Y2QFUTGiGVr5Iol8cMa GEKwlcXVqLrSljCVCpy/x34UC9Vf5sm+FvS1GuiYSEnftbu0OOp7M2QJXFeMUzMgRpbw l17+5cPjv6CDSnr1tccGxiqyitsgUHoNd09LwhmhJvwTvItpsS69a52nBc8nhFRGSGyT uGk+QD+V3czyhnBP+X23cfq0xoIuj5kCSdkrAJJb+34ifu0jjHS1bcQrWgR2nJPx627s iqb2m5t6ynTYBhAzpoFT/cKHxO8It3zWu5Zfg3UtOsnuZiIYkIe+McUbFJuHUgeGzVRO 117A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700346076; x=1700950876; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B119josK+jVs2ecxhPEL/ZG53Ca65uQoC2aDhpf/ABs=; b=kXwFVKyILacefyX+RxYTmCEBnqoBzdixdoVoraCHTD6RdY4ZAmotLVQz6avFJi5TQz vu74Fq2PdNwWgNEj6QBM1gMwUwgkzFKuHm1hUafb9Ee1THtR3yhq5pzjuBKxNNjd65Ov 7mAVuWXDIj+enWjQjYZp0xsR3hkhN+xnVimmQ5eO+EGIsW76dHKbcSf59pM7tIAlnCan iLPbf3QT/sIUGFtF+ttiGZfsFHKBpMrcZV0i92nHxgN+pFcXaZBKvD0/2P8+gywUJU+8 +69pJoLRpI+kVF9m6PXN/QKNzALv4u0L3Y247i2j8F9uJJwcs8TkUPWZrqlJ8PlQS80N /VZw== X-Gm-Message-State: AOJu0YwOfy8QWanfMUE/AuUmM7Xux2nJUXyZohPWaLz6Jl6pbLCreZwN BX4F3IFZauWeNvY89dbHSac= X-Google-Smtp-Source: AGHT+IHfkQkjALlAHjgb+TbRxpaKzlxrqELSYFI1FqqjNE4iR+HkNWNz19BbiIKxjSub4XKj0ulFtQ== X-Received: by 2002:a17:906:10d9:b0:9ef:b466:abe0 with SMTP id v25-20020a17090610d900b009efb466abe0mr3120554ejv.8.1700346076193; Sat, 18 Nov 2023 14:21:16 -0800 (PST) Received: from jernej-laptop.localnet (82-149-12-148.dynamic.telemach.net. [82.149.12.148]) by smtp.gmail.com with ESMTPSA id u1-20020a170906b10100b009b9977867fbsm2286388ejy.109.2023.11.18.14.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 14:21:15 -0800 (PST) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Samuel Holland , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Colin Ian King Cc: kernel-janitors@vger.kernel.org Subject: Re: [PATCH][next] clk: sunxi-ng: nkm: remove redundant initialization of tmp_parent Date: Sat, 18 Nov 2023 23:21:14 +0100 Message-ID: <13391015.uLZWGnKmhe@jernej-laptop> In-Reply-To: <20231023133502.666559-1-colin.i.king@gmail.com> References: <20231023133502.666559-1-colin.i.king@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231118_142117_888314_FBA2109C X-CRM114-Status: GOOD ( 15.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dne ponedeljek, 23. oktober 2023 ob 15:35:02 CET je Colin Ian King napisal(a): > Variable tmp_parent is being ininitialized with a value that is never > read, the initialization is redundant and can be removed. Move the > initialization and move the variable to the inner loop scope. > > Signed-off-by: Colin Ian King Applied, thanks! Best regards, Jernej > --- > drivers/clk/sunxi-ng/ccu_nkm.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/clk/sunxi-ng/ccu_nkm.c b/drivers/clk/sunxi-ng/ccu_nkm.c > index eed64547ad42..853f84398e2b 100644 > --- a/drivers/clk/sunxi-ng/ccu_nkm.c > +++ b/drivers/clk/sunxi-ng/ccu_nkm.c > @@ -21,17 +21,16 @@ static unsigned long ccu_nkm_find_best_with_parent_adj(struct ccu_common *common > unsigned long *parent, unsigned long rate, > struct _ccu_nkm *nkm) > { > - unsigned long best_rate = 0, best_parent_rate = *parent, tmp_parent = *parent; > + unsigned long best_rate = 0, best_parent_rate = *parent; > unsigned long best_n = 0, best_k = 0, best_m = 0; > unsigned long _n, _k, _m; > > for (_k = nkm->min_k; _k <= nkm->max_k; _k++) { > for (_n = nkm->min_n; _n <= nkm->max_n; _n++) { > for (_m = nkm->min_m; _m <= nkm->max_m; _m++) { > - unsigned long tmp_rate; > + unsigned long tmp_rate, tmp_parent; > > tmp_parent = clk_hw_round_rate(parent_hw, rate * _m / (_n * _k)); > - > tmp_rate = tmp_parent * _n * _k / _m; > > if (ccu_is_better_rate(common, rate, tmp_rate, best_rate) || > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel