Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp684231imm; Wed, 23 May 2018 04:00:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrWJhtIoOgGiKT0aetjo0MuvLZQNK3MfCkQpJqG+uCk9VbMXptP8Ka7Hq8E8dvKyPq9AAiu X-Received: by 2002:a17:902:6b47:: with SMTP id g7-v6mr2464375plt.251.1527073252449; Wed, 23 May 2018 04:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527073252; cv=none; d=google.com; s=arc-20160816; b=T18hk55KGfSpxSFHlU4fHB5e5TB2Ai9EPVvpXjudk4dNucDxz5kNKETRD0CoTvr6/F M+IDU79jzT0dGlTx6O7icGTeJKCE1+ki9cF+HRGe5QcpyV+TA6zN+z3zPeL7H8qIuURZ XmgpQb9c8ghFROwV0lFvzKoqADpmrzJkVfNpst+lknVby9hKnuUwWp1u8JKYyotdSRIM LzWyNRbZ92JKU4OAUMPgePfl5KfNxSZ7UHizxfRX6qFFUIez6GgsC54H58kbZ4YNzGv+ IgziavmHUBiLRkHnJsYTltl0stpHVfOJhaIKey3xI8dvMnmNHq9/rtmNZliDqNZMOcc9 5epA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=tkvK2Ydi3OlG8h6vL3SNQe7/OZzth2fiH9OjBVlfce8=; b=x9KGXHnBcz0MNyPA+/d6me5PH3/c2/rN2oA/eTD9h44T7wRvY7yvx4uEnvtORZh5je XQQor4xh1fnaLqK/YqY4fjZRpBIinihHwVxUN6rkCVyI/FO71YaBygXjd3bzXICfFsi3 3imxwnu/YWQPoCW3TFBlwjNkraCDF+BUza+IwZG24/1J4nakSyohVqm6kzenUvUNGgvW qiVoP2FE9eHjezHCsSMbVug99JnPHhh+AdR6sxC/b8dSA3he7aZhs+0vfkfnPtYjQFF1 vgKQOtOdzr1awdKF49umUNCA9w7qzR7nG48quySn+3C94PW7kS6M8m3X2EUyw9rof3pg G1Jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3-v6si14206643pgq.652.2018.05.23.04.00.37; Wed, 23 May 2018 04:00:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932512AbeEWK7Y (ORCPT + 99 others); Wed, 23 May 2018 06:59:24 -0400 Received: from mga03.intel.com ([134.134.136.65]:14103 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932312AbeEWK7W (ORCPT ); Wed, 23 May 2018 06:59:22 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 May 2018 03:59:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,432,1520924400"; d="scan'208";a="231077559" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga006.fm.intel.com with ESMTP; 23 May 2018 03:59:20 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1fLRUF-000AcX-DB; Wed, 23 May 2018 18:59:19 +0800 Date: Wed, 23 May 2018 18:58:59 +0800 From: kbuild test robot To: Laura Garcia Liebana Cc: kbuild-all@01.org, Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] netfilter: nft_numgen: fix ptr_ret.cocci warnings Message-ID: <20180523105859.GA74092@ivb42> References: <201805231855.2507c2Vh%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201805231855.2507c2Vh%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot net/netfilter/nft_numgen.c:117:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: d734a2888922 ("netfilter: nft_numgen: add map lookups for numgen statements") CC: Laura Garcia Liebana Signed-off-by: kbuild test robot --- nft_numgen.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/net/netfilter/nft_numgen.c +++ b/net/netfilter/nft_numgen.c @@ -114,10 +114,7 @@ static int nft_ng_inc_map_init(const str tb[NFTA_NG_SET_NAME], tb[NFTA_NG_SET_ID], genmask); - if (IS_ERR(priv->map)) - return PTR_ERR(priv->map); - - return 0; + return PTR_ERR_OR_ZERO(priv->map); } static int nft_ng_dump(struct sk_buff *skb, enum nft_registers dreg,