Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1642829imm; Fri, 27 Jul 2018 23:22:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd5fegR9ej+azKkrPRHn4oNKHI+T1NKqchJuNyvwoF/n7WrYZa0rjyrm8PgqRX3MTCKWtT1 X-Received: by 2002:a62:644d:: with SMTP id y74-v6mr9342600pfb.221.1532758929466; Fri, 27 Jul 2018 23:22:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532758929; cv=none; d=google.com; s=arc-20160816; b=M0VTL6fduFOsOv78I3NkAJ5jglesyfvqHWh7eBUvo0lYld7uBdxdWOLlN5V1XAgPda hK8Kg0ZjPdPoeIJOwdukbt5wmJlystZSs9ZHwGrLbdb60iIZ9ZJyfxFcIO96OO7suP99 RnLT2xYOVXl5WKfN8mgZsJZNAVuKtNAhAiFHkIA1ICZP+PoxoUIOOjmKr3qDnvN+q0lD mh7rXDj80uOG6N6ZqM34IXDMaVuWG9/Dxl2o5qZV4DYsQiBv9oJuQgt7E7+mdaNe48Oj 1Gvo+3tJT26rgjfiCTkBAewAZJdDgM4+5LHbjUvghhmOmhqed8+jpCHGE78pitaQef9w vWRw== 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:arc-authentication-results; bh=sKJTlvD4PdMWxlEgQPbfSLMvj8z4cmOArt0Lzo29z1k=; b=cnSTfvBgRL+VuHrd5KvuAzNnbjO9ybz7880+XIW7MbDul1q2mc1mUqzU0TnyBFsw0n n1RSfMpwEqjwWO9Ekh3AHHbgfe+4LPGW9Jf722bEh3H9dNkQEXBHPNCO11j/riMdkxez GiIbyqyv1HW4stfWS0FBwUNO9riU4FLJX6z3IW/83+rJ49v3R7vxJT6y9rnuVU8WnltU 1/U8fSR+HZzPEpP3CWQYYdjgNZgOdodUb5GMb5SDzWnH8O/jonbMrVY40EJCe7dwwpyJ wKg8kRF5I+DTEHcZtyYEFgoa+lcy2Xh9QGSQn5Ciqg7xeUa1jEf3EZNiQSEdzQ6za8qd DvUg== 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 m21-v6si5400988pgh.664.2018.07.27.23.21.27; Fri, 27 Jul 2018 23:22:09 -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 S1726378AbeG1HpD (ORCPT + 99 others); Sat, 28 Jul 2018 03:45:03 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:17580 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726155AbeG1HpD (ORCPT ); Sat, 28 Jul 2018 03:45:03 -0400 X-IronPort-AV: E=Sophos;i="5.51,412,1526335200"; d="scan'208";a="340565478" Received: from abo-214-111-68.mrs.modulonet.fr (HELO [192.168.0.15]) ([85.68.111.214]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jul 2018 08:19:38 +0200 Date: Sat, 28 Jul 2018 08:19:38 +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 Subject: [PATCH] drm/nouveau/debugfs: fix pm_runtime.cocci warnings (fwd) 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 --- Please take the patch only if it's a positive warning. Thanks! 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);