From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750969AbbDYUxk (ORCPT ); Sat, 25 Apr 2015 16:53:40 -0400 Received: from mail-vn0-f46.google.com ([209.85.216.46]:40313 "EHLO mail-vn0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750749AbbDYUxi (ORCPT ); Sat, 25 Apr 2015 16:53:38 -0400 Date: Sat, 25 Apr 2015 16:53:34 -0400 From: Tejun Heo To: Gabriele Mazzotta Cc: stripathi@apm.com, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org Subject: Re: [PATCH v2 1/2] libata: Add helper to determine when PHY events should be ignored Message-ID: <20150425205334.GA1499@htj.duckdns.org> References: <1429984357-2223-1-git-send-email-gabriele.mzt@gmail.com> <1429984357-2223-2-git-send-email-gabriele.mzt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429984357-2223-2-git-send-email-gabriele.mzt@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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