dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	kbuild-all@01.org, dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/amd/display: fix ptr_ret.cocci warnings
Date: Wed, 29 Aug 2018 04:00:57 +0800	[thread overview]
Message-ID: <20180828200057.GA13565@lkp-wsm-ep2> (raw)
In-Reply-To: <201808290454.H1lIvEzS%fengguang.wu@intel.com>

From: kbuild test robot <fengguang.wu@intel.com>

drivers/gpu/drm/amd/amdgpu/../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 <nicholas.kazlauskas@amd.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---

tree:   git://people.freedesktop.org/~agd5f/linux.git drm-next-4.20-wip
head:   bdb1922abd620d24715906bac4d119274d98f4c9
commit: e498eb7136042aa9a352b1039c678537f4694158 [220/235] 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/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/../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);
 }
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-08-28 20:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 20:00 [radeon-alex:drm-next-4.20-wip 220/235] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:771:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2018-08-28 20:00 ` kbuild test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-09-12  0:59 [radeon-alex:drm-next-4.20-wip 220/310] drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c:771:1-3: " kbuild test robot
2018-09-12  0:59 ` [PATCH] drm/amd/display: fix ptr_ret.cocci warnings kbuild test robot
2018-09-12 20:14   ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180828200057.GA13565@lkp-wsm-ep2 \
    --to=fengguang.wu@intel.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@01.org \
    --cc=nicholas.kazlauskas@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).