Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761467AbXJYXJe (ORCPT ); Thu, 25 Oct 2007 19:09:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755544AbXJYXJM (ORCPT ); Thu, 25 Oct 2007 19:09:12 -0400 Received: from tetsuo.zabbo.net ([207.173.201.20]:40563 "EHLO tetsuo.zabbo.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754400AbXJYXJJ (ORCPT ); Thu, 25 Oct 2007 19:09:09 -0400 Message-ID: <47212215.8080003@oracle.com> Date: Thu, 25 Oct 2007 16:09:09 -0700 From: Zach Brown User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: David Howells CC: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 01/31] Add an ERR_CAST() macro to complement ERR_PTR and co. [try #5] References: <20071025163352.5057.59344.stgit@warthog.procyon.org.uk> <20071025163357.5057.35399.stgit@warthog.procyon.org.uk> In-Reply-To: <20071025163357.5057.35399.stgit@warthog.procyon.org.uk> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 742 Lines: 21 > + * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type > + * @ptr: The pointer to cast. > + * > + * Explicitly cast an error-valued pointer to another pointer type in such a > + * way as to make it clear that's what's going on. > + */ > +static inline void *ERR_CAST(const void *ptr) > +{ > + return (void *) ptr; > +} Just to nit, surely you don't need the cast inside the function. The casting happens at the call site between the argument and returned pointer. - z - 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/