All of lore.kernel.org
 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, 12 Sep 2018 08:59:07 +0800	[thread overview]
Message-ID: <20180912005907.GA65044@sof-kbuild01> (raw)
In-Reply-To: <201809120805.3ZILTepU%fengguang.wu@intel.com>

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

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 <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:   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);
 }
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-09-12  0:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2018-09-12  0:59 ` kbuild test robot [this message]
2018-09-12 20:14   ` [PATCH] drm/amd/display: fix ptr_ret.cocci warnings Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
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 ` [PATCH] drm/amd/display: fix ptr_ret.cocci warnings kbuild test robot

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=20180912005907.GA65044@sof-kbuild01 \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.