From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756800AbcE0WFK (ORCPT ); Fri, 27 May 2016 18:05:10 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:33886 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbcE0WFH (ORCPT ); Fri, 27 May 2016 18:05:07 -0400 Date: Fri, 27 May 2016 23:04:58 +0100 From: Al Viro To: Arnd Bergmann Cc: Linus Torvalds , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Andrzej Hajda , Andrew Morton , "Rafael J. Wysocki" , Maxime Ripard , David Airlie , Robin Murphy , Thomas Gleixner , Adrian Hunter , Srinivas Kandagatla , Russell King , Bob Peterson , linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, linux-media@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, v9fs-developer@lists.sourceforge.net Subject: Re: [PATCH] remove lots of IS_ERR_VALUE abuses Message-ID: <20160527220458.GV14480@ZenIV.linux.org.uk> References: <1464384685-347275-1-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464384685-347275-1-git-send-email-arnd@arndb.de> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 27, 2016 at 11:23:25PM +0200, Arnd Bergmann wrote: > @@ -837,7 +837,7 @@ static int load_flat_shared_library(int id, struct lib_info *libs) > > res = prepare_binprm(&bprm); > > - if (!IS_ERR_VALUE(res)) > + if (res >= 0) if (res == 0), please - prepare_binprm() returns 0 or -E... > --- a/net/9p/client.c > +++ b/net/9p/client.c > @@ -521,7 +521,7 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req) > if (p9_is_proto_dotu(c)) > err = -ecode; > > - if (!err || !IS_ERR_VALUE(err)) { > + if (!err || !IS_ERR_VALUE((unsigned long)err)) { Not really - it's actually if (p9_is_proto_dotu(c) && ecode < 512) err = -ecode; if (!err) { ... > @@ -608,7 +608,7 @@ static int p9_check_zc_errors(struct p9_client *c, struct p9_req_t *req, > if (p9_is_proto_dotu(c)) > err = -ecode; > > - if (!err || !IS_ERR_VALUE(err)) { > + if (!err || !IS_ERR_VALUE((unsigned long)err)) { Ditto.