Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752815AbbBJOxr (ORCPT ); Tue, 10 Feb 2015 09:53:47 -0500 Received: from mail-qg0-f44.google.com ([209.85.192.44]:35882 "EHLO mail-qg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751240AbbBJOxp (ORCPT ); Tue, 10 Feb 2015 09:53:45 -0500 Date: Tue, 10 Feb 2015 09:53:41 -0500 From: Tejun Heo To: Nicholas Mc Guire Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] libata: fixup return type of wait_for_completion_timeout Message-ID: <20150210145341.GJ3220@htj.duckdns.org> References: <1423557576-18984-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423557576-18984-1-git-send-email-hofrat@osadl.org> 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 Content-Length: 578 Lines: 17 On Tue, Feb 10, 2015 at 03:39:36AM -0500, Nicholas Mc Guire wrote: > - if (!rc) { > + if (irq_timeout == 0) { Why == 0 tho? This always bothers me. To match this style, we'd use != 0 to test the other direction. In what way is "if (ret != 0)" better than "if (ret)"? We're negating the two tests needlessly. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/