Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1718865pxb; Fri, 24 Sep 2021 10:20:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAhzAvCT4CU18srgNjknQItxvSDmQmIwCJNHipr7KL9osUN2KROekuwAvEuGKJyujaqHdf X-Received: by 2002:a05:6602:55:: with SMTP id z21mr9720051ioz.205.1632504014638; Fri, 24 Sep 2021 10:20:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632504014; cv=none; d=google.com; s=arc-20160816; b=zgH16GI1bosK7CixyealdOjUrW2qr5g6DCPZ3xlONZeQFeASJRlDe3sfxK+YRiyokC HMR6iwl2IoW3JaZjMRMCukXKap7blCGcPjiAlDt48nB/oHI9dMvnd28fQC2l4mM9W1c/ 9tf1EXKdXzzQDWOkGXwIPNAuD78PtbZ2SshPCGtgVt1gyKHohGI/OIYj/H/SpAGhNgtJ ji60fjsQlqNnbrRHXWn0RsGw5CiVCGOwjRLajRGK6oGjWp0HY+jTBKvGpU41dsGu50EZ crJvyB8h7Ys7576YuPfbqr9B/uqXdBZwlG7F2IDj3Puv/k8GCaoSoQ5HhXecQilAXgWj W6bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3iEqZ3qsclbOJvD/oELO8UiHaEGurx3YzrHysFxm/SQ=; b=eOKuxxEIbQBf1X9xrDxSgmAYuubY5/Vhf0TLZmdItvsryZNfCmV70RMqRsvjDYIN9m Z7y5pHZcieDyU20o+3NLe4a302aj9BxXd7aLvRbQrmO5kuZoRz2gpPoxlkXObrlsPTeV uP1+FsDWwFSMfnNKwufYeu4bCCrFV3N/wJ1Pnt1zXpwU3HJWzM6KcmsNBbbFO5e7dQU1 o/UnHcouiSudysHtr7Cz6hr2x9fJbpHvWiCQ5AYdD+82zAnKjOqK+7zZnS0SbPQmgDcI BJU8Q7DAv4Wf48mTJhT6z+vNylG8/PGn1Ey0yylT20QH5OjYikUByfj4JnNM+B4eCC/9 MYew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RVyFiuo4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si12713303ilv.9.2021.09.24.10.19.53; Fri, 24 Sep 2021 10:20:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RVyFiuo4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344918AbhIXMxe (ORCPT + 99 others); Fri, 24 Sep 2021 08:53:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:45400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344149AbhIXMvo (ORCPT ); Fri, 24 Sep 2021 08:51:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2A0B861357; Fri, 24 Sep 2021 12:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632487752; bh=ckDzZx/F0M8XMpGOU1duiUOy/wn6eUR0XqvN7lA37a4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RVyFiuo4Ae4GJzeSONhXK2RzJmTi/TvlnElgNZ3WmWUzuNCJt7QKkj76NCiKCIM8N Qmnj0kdP7UV7dVdROg2ZNs8KPwC3Ov24dN+OJ5lNRgBCzlsWgOxTlOyD503LRQa5R0 KvQSGT9hMZ8ea7NzEoNnzNZVPxbjpeYSsfz2DTIk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Ben Skeggs , David Airlie , Daniel Vetter , Linus Torvalds Subject: [PATCH 4.19 34/34] drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV Date: Fri, 24 Sep 2021 14:44:28 +0200 Message-Id: <20210924124331.088873366@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210924124329.965218583@linuxfoundation.org> References: <20210924124329.965218583@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guenter Roeck commit e8f71f89236ef82d449991bfbc237e3cb6ea584f upstream. nvkm test builds fail with the following error. drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c: In function 'nvkm_control_mthd_pstate_info': drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c:60:35: error: overflow in conversion from 'int' to '__s8' {aka 'signed char'} changes value from '-251' to '5' The code builds on most architectures, but fails on parisc where ENOSYS is defined as 251. Replace the error code with -ENODEV (-19). The actual error code does not really matter and is not passed to userspace - it just has to be negative. Fixes: 7238eca4cf18 ("drm/nouveau: expose pstate selection per-power source in sysfs") Signed-off-by: Guenter Roeck Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c @@ -57,7 +57,7 @@ nvkm_control_mthd_pstate_info(struct nvk args->v0.count = 0; args->v0.ustate_ac = NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE; args->v0.ustate_dc = NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE; - args->v0.pwrsrc = -ENOSYS; + args->v0.pwrsrc = -ENODEV; args->v0.pstate = NVIF_CONTROL_PSTATE_INFO_V0_PSTATE_UNKNOWN; }