From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Dreier Subject: Re: [PATCH 01/31] Add an ERR_CAST() macro to complement ERR_PTR and co. [try #5] Date: Thu, 25 Oct 2007 16:38:38 -0700 Message-ID: References: <20071025163352.5057.59344.stgit@warthog.procyon.org.uk> <20071025163357.5057.35399.stgit@warthog.procyon.org.uk> <47212215.8080003@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Howells , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Zach Brown Return-path: Received: from sj-iport-3-in.cisco.com ([171.71.176.72]:40348 "EHLO sj-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758822AbXJYXik (ORCPT ); Thu, 25 Oct 2007 19:38:40 -0400 In-Reply-To: <47212215.8080003@oracle.com> (Zach Brown's message of "Thu, 25 Oct 2007 16:09:09 -0700") Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org > > +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. The way it's written you kinda do, since it takes a const void * and returns a plain void *. But I don't think that's the best way to write it.