drm/i915/hwmon: Fix static analysis tool reported issues
authorKarthik Poosa <karthik.poosa@intel.com>
Mon, 4 Dec 2023 14:48:09 +0000 (20:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jan 2024 12:42:34 +0000 (12:42 +0000)
commit80419c96f8e68ecdd79ea74497c36a61b3b2fc3f
tree4b3e152314b702504ea43f9143191ca18c8ea2aa
parentc3215484ca1f64b6b8af03847856499e5364e65a
drm/i915/hwmon: Fix static analysis tool reported issues

[ Upstream commit 768f17fd25e4a98bf5166148629ecf6f647d5efc ]

Updated i915 hwmon with fixes for issues reported by static analysis tool.
Fixed integer overflow with upcasting.

v2:
- Added Fixes tag (Badal).
- Updated commit message as per review comments (Anshuman).

Fixes: 4c2572fe0ae7 ("drm/i915/hwmon: Expose power1_max_interval")
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231204144809.1518704-1-karthik.poosa@intel.com
(cherry picked from commit ac3420d3d428443a08b923f9118121c170192b62)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/i915/i915_hwmon.c