From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28F91C2D0B1 for ; Tue, 4 Feb 2020 14:23:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE43720730 for ; Tue, 4 Feb 2020 14:23:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727290AbgBDOXO (ORCPT ); Tue, 4 Feb 2020 09:23:14 -0500 Received: from mga14.intel.com ([192.55.52.115]:11985 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727250AbgBDOXN (ORCPT ); Tue, 4 Feb 2020 09:23:13 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Feb 2020 06:23:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,402,1574150400"; d="scan'208";a="219762640" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by orsmga007.jf.intel.com with ESMTP; 04 Feb 2020 06:23:12 -0800 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1iyz6d-0003zL-JS; Tue, 04 Feb 2020 22:23:11 +0800 Date: Tue, 4 Feb 2020 22:22:02 +0800 From: kbuild test robot To: Taehee Yoo Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org, Jakub Kicinski , linux-kernel@vger.kernel.org Subject: [PATCH] netdevsim: fix ptr_ret.cocci warnings Message-ID: <20200204142200.hinq3pju772kmwyu@f53c9c00458a> References: <202002042248.5gLay9S1%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202002042248.5gLay9S1%lkp@intel.com> X-Patchwork-Hint: ignore User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot drivers/net/netdevsim/dev.c:937: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: 6556ff32f12d ("netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs") CC: Taehee Yoo Signed-off-by: kbuild test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master head: 83b43045308ea0600099830292955f18818f8d5e commit: 6556ff32f12d0a5380dd2fa6bbaa01373925a7d1 [40/48] netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs dev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/net/netdevsim/dev.c +++ b/drivers/net/netdevsim/dev.c @@ -934,9 +934,7 @@ int nsim_dev_port_del(struct nsim_bus_de int nsim_dev_init(void) { nsim_dev_ddir = debugfs_create_dir(DRV_NAME, NULL); - if (IS_ERR(nsim_dev_ddir)) - return PTR_ERR(nsim_dev_ddir); - return 0; + return PTR_ERR_OR_ZERO(nsim_dev_ddir); } void nsim_dev_exit(void) From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2394686370387134902==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: [PATCH] netdevsim: fix ptr_ret.cocci warnings Date: Tue, 04 Feb 2020 22:22:02 +0800 Message-ID: <20200204142200.hinq3pju772kmwyu@f53c9c00458a> In-Reply-To: <202002042248.5gLay9S1%lkp@intel.com> List-Id: --===============2394686370387134902== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kbuild test robot drivers/net/netdevsim/dev.c:937: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: 6556ff32f12d ("netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for d= ebugfs") CC: Taehee Yoo Signed-off-by: kbuild test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master head: 83b43045308ea0600099830292955f18818f8d5e commit: 6556ff32f12d0a5380dd2fa6bbaa01373925a7d1 [40/48] netdevsim: use IS_= ERR instead of IS_ERR_OR_NULL for debugfs dev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/net/netdevsim/dev.c +++ b/drivers/net/netdevsim/dev.c @@ -934,9 +934,7 @@ int nsim_dev_port_del(struct nsim_bus_de int nsim_dev_init(void) { nsim_dev_ddir =3D debugfs_create_dir(DRV_NAME, NULL); - if (IS_ERR(nsim_dev_ddir)) - return PTR_ERR(nsim_dev_ddir); - return 0; + return PTR_ERR_OR_ZERO(nsim_dev_ddir); } = void nsim_dev_exit(void) --===============2394686370387134902==--