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

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

 



On Fri, May 06, 2016 at 05:53:31AM +0000, David Binderman wrote:
> Hello there Darren,
> 
> ----------------------------------------
> >> 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?
> 
> Something like
> 
> --- drivers/platform/x86/wmi.c.sav    2016-05-06 06:50:13.128600783 +0100
> +++ drivers/platform/x86/wmi.c    2016-05-06 06:51:09.497279659 +0100
> @@ -521,7 +521,7 @@
>  
>              wmi_status = wmi_method_enable(block, 1);
>              if ((wmi_status != AE_OK) ||
> -                ((wmi_status == AE_OK) && (status == AE_NOT_EXIST)))
> +                (status == AE_NOT_EXIST))
>                  status = wmi_status;
>          }
>      }
> @@ -565,8 +565,7 @@
>                  block->handler = NULL;
>                  block->handler_data = NULL;
>                  if ((wmi_status != AE_OK) ||
> -                    ((wmi_status == AE_OK) &&
> -                     (status == AE_NOT_EXIST)))
> +                    (status == AE_NOT_EXIST))
>                      status = wmi_status;
>              }
>          }
> 
> with some extra work, would probably work.

Heh, yes, indeed. It was the extra work part I was asking if you would be
willing to complete. :-)

If not, thanks for reporting it, we will add this to the todo list.

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