lkml.org 
[lkml]   [2015]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] libata: Add helper to determine when PHY events should be ignored
On Sat, Apr 25, 2015 at 07:52:36PM +0200, Gabriele Mazzotta wrote:
> +bool sata_lpm_ignore_phy_events(struct ata_link *link)
> +{
> + /* if LPM is enabled, PHYRDY doesn't mean anything */
> + return !!(link->lpm_policy > ATA_LPM_MAX_POWER);

This gets removed by the next patch so it doesn't matter but there's
no need to do !! here. The expression is already bool and even if not
casting to bool can't yield any other result.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2015-04-25 23:21    [W:0.027 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site