From patchwork Fri Jan 28 16:35:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 12728739 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 B2164C433EF for ; Fri, 28 Jan 2022 16:37:13 +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: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:In-Reply-To:References: List-Owner; bh=iBE+ymnTw0x/e+jQZfoICpYE7YO4O44Boi8D8Mw45TE=; b=wPjbA54Hu5IBim l8Mo75CzTWTEGAv3o0g2oCDOYJkK8x4FlILQLi6KPdVdoIPWH+jRPPMYY3iiBSX55cwbGV7xe1oP2 MjHr8Oom7lv+60+097t1si19rAfp5BZ3K8woB85yMX8WTaQEQnJ+DxeJbZH/TvTqndJ0acgVAMWdz E2KMikmLrQEriClMUun8yeDSEAlRR1S0oD88s6vsQzYFZyt5guKiqLTgL9JMMJYs3cE3VLKnkTc87 YUFGfRzAyvAvFSrk3wZvKmdadz94jbNotwq5ZzWO08meCWoQ+tmafSmWZ2wZku8ATYSTyWYUjR+Nl AMso6OQ7ZN2CKtDBiz7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDUEE-0030wV-BQ; Fri, 28 Jan 2022 16:36:02 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDUEA-0030v6-EX for linux-arm-kernel@lists.infradead.org; Fri, 28 Jan 2022 16:36:00 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id C990F1F46300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1643387755; bh=S4Z9IVyEDWl5NFUhRrfhKWpv39Y/h9ZoEjs/1KHozrI=; h=From:To:Cc:Subject:Date:From; b=akyfuuwp7yF5ZmP+FMZrRp8amwzILjjcWdkGPxvtVaKcXNQkFn0p9W9xtg+JcOLLy nYpd6Pv7Il5ewKvnsxEY4jdo/CxchOZ0RGtSL0DKSKHneAwyKdqGIHybQAMk+9qK4K bptyaGaQcGhB3j2/eD5Upv7o8HJA40ik7zd3fAe164EhYcwqdsi6qRrLUel9+i69uR M7KF17DfyAIVAgNGpBIEcv/PO2MFpiFso+ttLqXrUOEUwHGle4tjBp4CQhzbIOb+oL mATjdnOtTn0riKxVWnZOwggBqifwk1APp+Eh3nJ/vMgkqj/uaU81QOqU9fqDoesFZD VUOaizw9THSXA== From: Muhammad Usama Anjum To: Michael Turquette , Stephen Boyd , Nobuhiro Iwamatsu Cc: Muhammad Usama Anjum , kernel@collabora.com, kernel-janitors@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: visconti: Remove dead code Date: Fri, 28 Jan 2022 21:35:27 +0500 Message-Id: <20220128163527.1587325-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220128_083558_687946_35883834 X-CRM114-Status: UNSURE ( 8.56 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org rs_id is of unsigned type, u8. The condition rs_id >= 0 will always be true. Remove the if-else condition and the dead code. Signed-off-by: Muhammad Usama Anjum --- drivers/clk/visconti/clkc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/clk/visconti/clkc.c b/drivers/clk/visconti/clkc.c index 56a8a4ffebca8..5ccf771d05985 100644 --- a/drivers/clk/visconti/clkc.c +++ b/drivers/clk/visconti/clkc.c @@ -147,13 +147,9 @@ int visconti_clk_register_gates(struct visconti_clk_provider *ctx, if (!dev_name) return -ENOMEM; - if (clks[i].rs_id >= 0) { - rson_offset = reset[clks[i].rs_id].rson_offset; - rsoff_offset = reset[clks[i].rs_id].rsoff_offset; - rs_idx = reset[clks[i].rs_id].rs_idx; - } else { - rson_offset = rsoff_offset = rs_idx = -1; - } + rson_offset = reset[clks[i].rs_id].rson_offset; + rsoff_offset = reset[clks[i].rs_id].rsoff_offset; + rs_idx = reset[clks[i].rs_id].rs_idx; div_clk = devm_clk_hw_register_fixed_factor(dev, dev_name,