platform/x86: intel_ips: fix set but unused warning in read_mgtv
PATCH v2 1/1 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'.
--- drivers/platform/x86/intel_ips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel_ips.c +1 -1
@@ -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;
Signature · 1 line
2.31.1
Hi,
Quoted 9 lines · yangerkun
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 <[email protected]>Signed-off-by yangerkun <[email protected]>
Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.
Regards,
Hans
Quoted 18 lines
--- drivers/platform/x86/intel_ips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/platform/x86/intel_ips.c +1
-1@@ -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;