From patchwork Wed Sep 12 00:59:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 10596667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0574C6CB for ; Wed, 12 Sep 2018 00:59:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E64EA297F7 for ; Wed, 12 Sep 2018 00:59:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAB202982E; Wed, 12 Sep 2018 00:59:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DA67B297F7 for ; Wed, 12 Sep 2018 00:59:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 55E576E41C; Wed, 12 Sep 2018 00:59:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id A00E26E41C for ; Wed, 12 Sep 2018 00:59:40 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2018 17:59:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,362,1531810800"; d="scan'208";a="82737297" Received: from bee.sh.intel.com (HELO lkp-server01) ([10.239.97.14]) by orsmga003.jf.intel.com with ESMTP; 11 Sep 2018 17:59:23 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1fztV4-000CFA-Fs; Wed, 12 Sep 2018 08:59:22 +0800 Date: Wed, 12 Sep 2018 08:59:07 +0800 From: kbuild test robot To: Nicholas Kazlauskas Subject: [PATCH] drm/amd/display: fix ptr_ret.cocci warnings Message-ID: <20180912005907.GA65044@sof-kbuild01> References: <201809120805.3ZILTepU%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201809120805.3ZILTepU%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Deucher , kbuild-all@01.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c:771: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: e498eb713604 ("drm/amd/display: Add support for hw_state logging via debugfs") CC: Nicholas Kazlauskas Signed-off-by: kbuild test robot --- tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.20-wip head: d8de8260a45aae8f74af77eae9a162bdc0ed48d2 commit: e498eb7136042aa9a352b1039c678537f4694158 [220/310] drm/amd/display: Add support for hw_state logging via debugfs amdgpu_dm_debugfs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -768,8 +768,5 @@ int dtn_debugfs_init(struct amdgpu_devic adev, &dtn_log_fops); - if (IS_ERR(ent)) - return PTR_ERR(ent); - - return 0; + return PTR_ERR_OR_ZERO(ent); }