From patchwork Tue Apr 30 19:35:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 1929821 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=wanadoo.fr header.i=@wanadoo.fr header.a=rsa-sha256 header.s=t20230301 header.b=e9vL+6Zr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTVqB4Tq7z1ydT for ; Wed, 1 May 2024 05:38:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=wanadoo.fr header.i=@wanadoo.fr header.a=rsa-sha256 header.s=t20230301 header.b=e9vL+6Zr; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTVqB2mkTz3cjX for ; Wed, 1 May 2024 05:38:14 +1000 (AEST) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=wanadoo.fr header.i=@wanadoo.fr header.a=rsa-sha256 header.s=t20230301 header.b=e9vL+6Zr; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=wanadoo.fr (client-ip=80.12.242.80; helo=msa.smtpout.orange.fr; envelope-from=christophe.jaillet@wanadoo.fr; receiver=lists.ozlabs.org) Received: from msa.smtpout.orange.fr (smtp-80.smtpout.orange.fr [80.12.242.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTVnr63M2z30Np for ; Wed, 1 May 2024 05:37:04 +1000 (AEST) Received: from localhost.localdomain ([86.243.17.157]) by smtp.orange.fr with ESMTPA id 1tGXsqFYLGyax1tGfss3e5; Tue, 30 Apr 2024 21:35:58 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1714505758; bh=KS+TeFbjBWX9rgIDk409K2MoYqtyjLkv3GQe1jxfQhU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=e9vL+6ZrgjJ68/ouUB/vmJWJpMlplejctB6eF/dWgiHgPT4QjCTGD5HI4dMFlX7qf bea9axvhuGIBqjh92H+7+85/GE/lg+dGQrLXFRQsfrYhtnn0vod6lhglae4o+Phnml /DUG0aTQvR2K+X4R6KSOONbyAR4j+L9dlTOFmFczhtO8ruaO9HuYHUOHvD52n07Fkd dQ41jZV1e6kTI0OFmn54cQcKZc6LyR5GUA+7sfXNpo7W0Ye5BH1I4ohtPxsUgdX6wr rzuDyr3xW8R8T6YE/NHSpHdgUsUQe9MziyZiJ3Ha4OpSEXS5bsru9oDj5pOCei5OdM vsV9NjI9XVLmw== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 30 Apr 2024 21:35:58 +0200 X-ME-IP: 86.243.17.157 From: Christophe JAILLET To: Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Jean Delvare , Guenter Roeck Subject: [PATCH 2/2] hwmon: (npcm750-pwm-fan) Remove another unused field in struct npcm7xx_cooling_device Date: Tue, 30 Apr 2024 21:35:38 +0200 Message-ID: <2ff738663d40ac5ae3d0b4d2e688ff7e36032be8.1714505655.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.44.0 In-Reply-To: <74eee8aa739f94b8c6425ce3e37a427ca92243ea.1714505655.git.christophe.jaillet@wanadoo.fr> References: <74eee8aa739f94b8c6425ce3e37a427ca92243ea.1714505655.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-hwmon@vger.kernel.org, Christophe JAILLET , openbmc@lists.ozlabs.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" In "struct npcm7xx_cooling_device", the 'pwm_clk_freq' field is only written and never used. Remove it and update npcm7xx_pwm_init() accordingly. Signed-off-by: Christophe JAILLET --- Compile tested only. --- drivers/hwmon/npcm750-pwm-fan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c index 6d92a3b89198..bc8db1dc595d 100644 --- a/drivers/hwmon/npcm750-pwm-fan.c +++ b/drivers/hwmon/npcm750-pwm-fan.c @@ -196,7 +196,6 @@ struct npcm7xx_pwm_fan_data { void __iomem *pwm_base; void __iomem *fan_base; int pwm_modules; - unsigned long pwm_clk_freq; struct clk *pwm_clk; struct clk *fan_clk; struct mutex pwm_lock[NPCM7XX_PWM_MAX_MODULES]; @@ -691,11 +690,12 @@ static u32 npcm7xx_pwm_init(struct npcm7xx_pwm_fan_data *data) { int m, ch; u32 prescale_val, output_freq; + unsigned long pwm_clk_freq; - data->pwm_clk_freq = clk_get_rate(data->pwm_clk); + pwm_clk_freq = clk_get_rate(data->pwm_clk); /* Adjust NPCM7xx PWMs output frequency to ~25Khz */ - output_freq = data->pwm_clk_freq / PWN_CNT_DEFAULT; + output_freq = pwm_clk_freq / PWN_CNT_DEFAULT; prescale_val = DIV_ROUND_CLOSEST(output_freq, PWM_OUTPUT_FREQ_25KHZ); /* If prescale_val = 0, then the prescale output clock is stopped */