lkml.org 
[lkml]   [2014]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] ipmi: Turn off all activity on an idle ipmi interface
On Sun, Feb 23, 2014 at 08:23:35PM -0600, minyard@acm.org wrote:
> @@ -1194,7 +1223,17 @@ int ipmi_set_gets_events(ipmi_user_t user, int val)
> INIT_LIST_HEAD(&msgs);
>
> spin_lock_irqsave(&intf->events_lock, flags);
> - user->gets_events = val;
> + if (user->gets_events == !!val)
> + goto out;
> +
> + user->gets_events = !!val;

Why not have val declared as bool and let compiler convert as needed?

Thanks.

--
Dmitry


\
 
 \ /
  Last update: 2014-02-26 04:01    [W:0.096 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site