Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758364Ab3CZFAv (ORCPT ); Tue, 26 Mar 2013 01:00:51 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45618 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750857Ab3CZFAu (ORCPT ); Tue, 26 Mar 2013 01:00:50 -0400 Date: Mon, 25 Mar 2013 22:01:50 -0700 From: Andrew Morton To: Rusty Russell Cc: Alexandru Gheorghiu , "Michael S. Tsirkin" , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH] drivers: virtio: Use PTR_RET function Message-Id: <20130325220150.af9795a7.akpm@linux-foundation.org> In-Reply-To: <87fvzidenm.fsf@rustcorp.com.au> References: <1364217936-6284-1-git-send-email-gheorghiuandru@gmail.com> <87fvzidenm.fsf@rustcorp.com.au> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1063 Lines: 29 On Tue, 26 Mar 2013 13:57:09 +1030 Rusty Russell wrote: > Alexandru Gheorghiu writes: > > > Used PTR_RET function instead of IS_ERR and PTR_ERR. > > Patch found using coccinelle. > > WTF is PTR_RET? PTR_RET doesn't return anything. Why is it called > that? It doesn't even make sense. > > ZERO_OR_PTR_ERR() maybe. > > But what problem are we solving? Insufficient churn in the tree? Code > being too readable? This isn't some hard-to-get right corner case, or a > missed optimization. > > Andrew, what am I missing here? It seemed like a good idea at the time. Merged it two years ago and have since been keenly awaiting an opportunity to use it. It seems that people _have_ been using it, but mainly netfilter people and we know they're all crazy ;) -- 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/