Re: drivers/platform/x86/wmi.c bug report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 30, 2016 at 09:21:45AM +0000, David Binderman wrote:
> Hello there,
> 
> drivers/platform/x86/wmi.c:523]: (style) Redundant condition: wmi_status==AE_OK. 'A || (!A && B)' is equivalent to 'A || B'

Thanks David. Would you care to send a patch?

> 
> Source code is
> 
>             if ((wmi_status != AE_OK) ||
>                 ((wmi_status == AE_OK) && (status == AE_NOT_EXIST)))
> 
> Suggest new code
> 
>             if ((wmi_status != AE_OK) ||
>                 (status == AE_NOT_EXIST))
> 
> Also:
> 
> drivers/platform/x86/wmi.c:567]: (style) Redundant condition: wmi_status==AE_OK. 'A || (!A && B)' is equivalent to 'A || B'
> 
> Source code is
> 
>                 if ((wmi_status != AE_OK) ||
>                     ((wmi_status == AE_OK) &&
>                      (status == AE_NOT_EXIST)))
> 
> Duplicate.
> 
> 
> Regards
> 
> David Binderman
> 
> 
>  		 	   		  

-- 
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux