From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sunset.davemloft.net (74-93-104-97-Washington.hfc.comcastbusiness.net [74.93.104.97]) by ozlabs.org (Postfix) with ESMTP id E00AAB7183 for ; Thu, 2 Sep 2010 01:27:13 +1000 (EST) Date: Wed, 01 Sep 2010 08:27:29 -0700 (PDT) Message-Id: <20100901.082729.135524471.davem@davemloft.net> To: grant.likely@secretlab.ca Subject: Re: ERR_PTR pattern in phylib From: David Miller In-Reply-To: References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Cc: netdev@vger.kernel.org, afleming@freescale.com, linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Grant Likely Date: Wed, 1 Sep 2010 08:42:49 -0600 > It seems to me that phylib is one of the cases where the users (the > network drivers) don't actually care about the specific error code > when calling phylib functions. The drivers only seem to care whether > or not the function failed, and if it did then bail out. I've also > noticed that using the "if (!ptr)" test on phylib return values is a > common error for driver writers. > > In the interest of making driver code easier to write and review, > would you be opposed to a set of patches to remove the ERR_PTR() > pattern from phylib and its users? I'm opposed to it because it means that if code actually does care about the error code it will no longer be able to obtain it. Please don't make this change, thanks.