summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authoryangerkun <yangerkun@huawei.com>2021-06-07 09:47:02 +0800
committerHans de Goede <hdegoede@redhat.com>2021-06-16 17:47:55 +0200
commit8f44f316d1da2ad521e62028a812284bb72ef3d4 (patch)
tree73c21f9c6eb2ac6b0b967af73ccc347d46b5ce11 /drivers/platform
parent77d06ec65a281c5382f4ea2398a267dc3bd7bfe3 (diff)
downloadlinux-8f44f316d1da2ad521e62028a812284bb72ef3d4.tar.bz2
platform/x86: intel_ips: fix set but unused warning in read_mgtv
drivers/platform/x86/intel_ips.c:832:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 832 | u16 ret; | ^~~ Fix it by mark ret as '__maybe_unused'. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: yangerkun <yangerkun@huawei.com> Link: https://lore.kernel.org/r/20210607014702.2981097-1-yangerkun@huawei.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel_ips.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
index bffe548187ee..4dfdbfca6841 100644
--- a/drivers/platform/x86/intel_ips.c
+++ b/drivers/platform/x86/intel_ips.c
@@ -829,7 +829,7 @@ static u16 calc_avg_temp(struct ips_driver *ips, u16 *array)
static u16 read_mgtv(struct ips_driver *ips)
{
- u16 ret;
+ u16 __maybe_unused ret;
u64 slope, offset;
u64 val;