Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1786279pxb; Fri, 24 Sep 2021 11:49:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi9xf8NH2yD37in3CCPGAbfeSUniUN3F5DLNe8lewI0AEDVyXfKJPMNljoSjBcbJzYEa7z X-Received: by 2002:a05:6e02:1aac:: with SMTP id l12mr9632366ilv.318.1632509344316; Fri, 24 Sep 2021 11:49:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632509344; cv=none; d=google.com; s=arc-20160816; b=GvWBrVEgipwEyV+jjs/FU4q1e3f/fJbnkS+RJHgKx9imtY2N/UdRZ3FCXbz74StdtY 1aDb3Heoi6kJVtwbidqE+8pXskMsRfo91653EVMglXq1yP0/OSAHOaI6XUnKaAPhnwC/ J/JkHLeWPgp7dVGLSeg+gcBFIk9zsv5HczDZfexIMpj6c7jZuqBxfdmE24s52Rka5GS2 fmMy5w6P72UDHWzq9EFfvm94oX9ewsyMVTqww4qYHifcqUe8IaTQCPTZth80mwNe086q VeoHLU94lp+grWSof6aoyoHjRf+yjRzquWQD6EaXDkd01BJsiEkTcqbmrqkjwfDZA577 JUXA== 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=uovhqgGG7mGhkApV7XZFUd70KtC5f5w2uSxQsez2PDO3zfkBc9nGNdhc6sFGMpkCmy nRvF3kJVG3gnISM/oLUY1fOeUA89k5MWKnyeE1aJcRYjZwIS/Z11rjPjvvsnBnKEI168 hQqOcJg0WSsNlHIoxEbvY2GIKqZEyScYT9Apb1Cnw8MXGsDhtzHjxLJQ/MQsWz7hT/sN bCFsZO/4xYW2CMXY1zbygGrRdBKsptDOQfiGaEUk6UD+R1q6GtPAw7pX+1ORqL9Aby1q FuaacW3tGrp9Y2qmfuZORO1YxwMOOmXUPwrRdPQRZpwbsZL8tAb1a9VSD9rzqNswgPht UAsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UPf+dx5L; 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 n32si5255175ioz.14.2021.09.24.11.48.52; Fri, 24 Sep 2021 11:49:04 -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=UPf+dx5L; 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 S1346020AbhIXNPC (ORCPT + 99 others); Fri, 24 Sep 2021 09:15:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:38210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345142AbhIXNLG (ORCPT ); Fri, 24 Sep 2021 09:11:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D7FCE615A6; Fri, 24 Sep 2021 12:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632488311; bh=ckDzZx/F0M8XMpGOU1duiUOy/wn6eUR0XqvN7lA37a4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UPf+dx5LUIJSfTmuDnTVlrRdkmJ15ZCR18FEjM9iABatS/V7XUQfnloY3cn0DdP2z 92gL8FHLz+TJkcwNtIYdWtVGAkQ4uVOECkQLKz1iNxX5tvQi5xk3+qocGdU/ecm4O8 7kLgK/KSh3EqnOtWx9rBQdO8lZs/qQJPGkDxtjr8= 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 5.10 63/63] drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV Date: Fri, 24 Sep 2021 14:45:03 +0200 Message-Id: <20210924124336.422690583@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210924124334.228235870@linuxfoundation.org> References: <20210924124334.228235870@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; }