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>
This commit is contained in:
yangerkun 2021-06-07 09:47:02 +08:00 committed by Hans de Goede
parent 77d06ec65a
commit 8f44f316d1

View File

@ -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;