From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zach Brown Subject: Re: [PATCH 01/31] Add an ERR_CAST() macro to complement ERR_PTR and co. [try #5] Date: Thu, 25 Oct 2007 17:20:25 -0700 Message-ID: <472132C9.20903@oracle.com> 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=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: David Howells , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Roland Dreier Return-path: Received: from tetsuo.zabbo.net ([207.173.201.20]:47223 "EHLO tetsuo.zabbo.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751684AbXJZAUZ (ORCPT ); Thu, 25 Oct 2007 20:20:25 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Roland Dreier wrote: > > > +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 *. Ah, right, I missed that. - z