linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Karol Herbst <karolherbst@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>,
	Martin Peres <martin.peres@free.fr>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, kbuild-all@01.org, nm@ti.com
Subject: [PATCH] drm/nouveau/debugfs: fix pm_runtime.cocci warnings
Date: Thu, 6 Sep 2018 20:06:45 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1809062004110.3318@hadrien> (raw)

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

pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 164

Generated by: scripts/coccinelle/api/pm_runtime.cocci

Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking")
CC: Karol Herbst <karolherbst@gmail.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b36fdc6853a38a6f8749897a33435635019e0647
commit: eaeb9010bb4bcdc20e58254fa42f3fe730a7f908 drm/nouveau/debugfs: Wake up GPU before doing any reclocking
:::::: branch date: 21 hours ago
:::::: commit date: 7 weeks ago

 nouveau_debugfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
@@ -161,7 +161,7 @@ nouveau_debugfs_pstate_set(struct file *
 	}

 	ret = pm_runtime_get_sync(drm->dev);
-	if (IS_ERR_VALUE(ret) && ret != -EACCES)
+	if (ret < 0 && ret != -EACCES)
 		return ret;
 	ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args));
 	pm_runtime_put_autosuspend(drm->dev);

                 reply	other threads:[~2018-09-06 18:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.DEB.2.20.1809062004110.3318@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=karolherbst@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.peres@free.fr \
    --cc=nm@ti.com \
    --cc=nouveau@lists.freedesktop.org \
    /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).