public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux PM <linux-pm@vger.kernel.org>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: [PATCH v2 3/4] thermal: intel: int340x: Drop pointless cast to unsigned long
Date: Mon, 30 Jan 2023 19:45:17 +0100	[thread overview]
Message-ID: <1921559.PYKUYFuaPT@kreacher> (raw)
In-Reply-To: <2133431.irdbgypaU6@kreacher>

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

The explicit casting from int to unsigned long in
int340x_thermal_get_zone_temp() is pointless, becuase the multiplication
result is cast back to int by the assignment in the same statement, so
drop it.

No expected functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

v1 -> v2:
   * It was [6/6] in v1
   * Rebase

---
 drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
===================================================================
--- linux-pm.orig/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
+++ linux-pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
@@ -29,7 +29,7 @@ static int int340x_thermal_get_zone_temp
 		if (conv_temp < 0)
 			return conv_temp;
 
-		*temp = (unsigned long)conv_temp * 10;
+		*temp = conv_temp * 10;
 	} else {
 		/* _TMP returns the temperature in tenths of degrees Kelvin */
 		*temp = deci_kelvin_to_millicelsius(tmp);




  parent reply	other threads:[~2023-01-30 18:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 18:37 [PATCH v2 0/4] thermal: intel: int340x: Assorted cleanups Rafael J. Wysocki
2023-01-30 18:42 ` [PATCH v2 1/4] thermal: intel: int340x: Assorted minor cleanups Rafael J. Wysocki
2023-01-31 15:36   ` Daniel Lezcano
2023-01-30 18:43 ` [PATCH v2 2/4] thermal: intel: int340x: Rename variable in int340x_thermal_zone_add() Rafael J. Wysocki
2023-01-30 18:45 ` Rafael J. Wysocki [this message]
2023-01-31 15:38   ` [PATCH v2 3/4] thermal: intel: int340x: Drop pointless cast to unsigned long Daniel Lezcano
2023-01-30 18:47 ` [PATCH v2 4/4] thermal: intel: int340x: Improve int340x_thermal_set_trip_temp() Rafael J. Wysocki
2023-01-31 15:39   ` Daniel Lezcano
2023-02-01  9:09 ` [PATCH v2 0/4] thermal: intel: int340x: Assorted cleanups Zhang, Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1921559.PYKUYFuaPT@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox