Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754885Ab3FPDO0 (ORCPT ); Sat, 15 Jun 2013 23:14:26 -0400 Received: from ozlabs.org ([203.10.76.45]:39354 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754780Ab3FPDOZ (ORCPT ); Sat, 15 Jun 2013 23:14:25 -0400 From: Rusty Russell To: Julia Lawall , "Michael S. Tsirkin" Cc: Julia Lawall , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Thomas Meyer , grant.likely@linaro.org, rob.herring@calxeda.com, linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [RFC] PTR_ERR: return 0 if ptr isn't an error value. In-Reply-To: References: <1370080565.29224.29.camel@localhost.localdomain> <87mwr8sz9g.fsf@rustcorp.com.au> <20130603071526.GA5483@pengutronix.de> <87mwquzkvf.fsf@rustcorp.com.au> <20130613073046.GB10326@redhat.com> User-Agent: Notmuch/0.15.2+81~gd2c8818 (http://notmuchmail.org) Emacs/23.4.1 (i686-pc-linux-gnu) Date: Sun, 16 Jun 2013 12:14:11 +0930 Message-ID: <87ehc2rczo.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 909 Lines: 28 Julia Lawall writes: > On Thu, 13 Jun 2013, Michael S. Tsirkin wrote: > >> On Thu, Jun 13, 2013 at 02:07:40PM +0930, Rusty Russell wrote: >> > I think using PTR_ERR() is a less bad solution than promoting PTR_RET, >> > which has a non-obvious name. >> >> Will a longer name make the function more obvious? >> PTR_ERR_OR_ZERO() ? >> PTR_ERR0() ? >> PTR_ERR() can then stay simple for cases where we know we >> are on the error path. > > I was thinking of something along those lines. And in that case, PTR_ERR > could stay without the additional test. > julia OK, sold :) Will send out a series now with PTR_ERR_OR_ZERO. Thanks, Rusty. -- 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/