Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1031237imm; Thu, 6 Sep 2018 14:11:52 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdal6tJ8J3mXLlyvOfQbF0ilaZgv1jEqrxpUezU+k06S04/kwZ1BJ1X1pFH3WRjN7v63gTf9 X-Received: by 2002:a62:8208:: with SMTP id w8-v6mr4929736pfd.215.1536268311926; Thu, 06 Sep 2018 14:11:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536268311; cv=none; d=google.com; s=arc-20160816; b=ToDC6BkXgHS11/ausFM9/j0Y118c8ouMqWpHsjA849bZGtogQ71dSPDh4BAv81kqLO 4p5pqDf8ZQgSSujPnT+NcWqUuwsXHLaTMy5vq7nEHd6/twpstS8/vl9Lf9XJ2Z2ezOdI 0xfhYWuIkMMff080C/puY6XQSjCr/GGlyRD4hJB4zXP7OvNTjQLlmO6S6I5aLYsXLVEg bQJBpBHIUiTNyYOW/x6oRp3d2KGXwcBb4R7o5FfIoR2UfUq+vJbqRFNFRIyeU07xCLT9 aJkrU2fPjdH7XgdfiwGngLEHKJ6KPsxW6C+A69QsjlNT7oVpl8tZl/ey93abWsvCWrIv rZvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=unwGBQOqXe/H+V5hD2hSeFwPN+DcIYMpY2bB2rzNnbo=; b=AB0g3OKCBIht9ya01wR1ITZLykHMZgmXfZy7Qb1K9euIEKaOWFR2j0wxTvfaK2AfIs /kx2Ga5cBTKSlN1rQV2sAin8Ij1NNjE1/nihtJlCDumpvs3GbfHayJjzuU+pvVLC+VrK t+HImKqv8UGIM7THIQhCUj4dzv4+TKn1tYk+p8gIR5uqSnNHJ2PqOYQQrRTcr4PUBX7F n8lxvjAoHYipDFdQz3my3QHJK6r3A7bmIdeAq0JKZn3j6SBfTlOcVZFVyc88I97GjNLr yZv7iO4NIUwr9Lf5KzlRQKcKCP0ugAUiOQ53XVM3eOgFsifZEzPHNV7IYc4iNQZ8S42Y RENQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x68-v6si5938629pfc.239.2018.09.06.14.11.36; Thu, 06 Sep 2018 14:11:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730304AbeIFWn0 (ORCPT + 99 others); Thu, 6 Sep 2018 18:43:26 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:9376 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728478AbeIFWnZ (ORCPT ); Thu, 6 Sep 2018 18:43:25 -0400 X-IronPort-AV: E=Sophos;i="5.53,339,1531778400"; d="scan'208";a="278027505" Received: from lneuilly-657-1-24-134.w92-154.abo.wanadoo.fr (HELO hadrien) ([92.154.38.134]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2018 20:06:45 +0200 Date: Thu, 6 Sep 2018 20:06:45 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Karol Herbst cc: Ben Skeggs , Martin Peres , David Airlie , 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 Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot 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 Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- 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);