From nobody Sat Nov 30 10:55:34 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D63CF18C31 for ; Mon, 9 Sep 2024 20:25:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725913528; cv=none; b=qUycEmOsd+x3xFlnT18JaU6D1xghajQ8fhqExZE+nQpRzZQRHv1yJd3C8rzhH2pc6GnMBQJxF6zqOKOaAtpaPx0AmyDgISdG4yv2LV8oAl2JGc0NlodVJfwObfxav2s16zHN+TInB+CTo8FKIttUZAFIBqr5JHF8ZpD6K2L5Fyo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725913528; c=relaxed/simple; bh=IoliWmKGaEhCYdKBghauwV3MP5okR9y80Qjj6G0/EN4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=NvveNiD8w6Mvr/ayqFuDWL6J8nT5wnSnetdu8ql/Ys7BopXqB+Q38fL0cBOriHMsel/N7+gqAol2GloGWkwIGjLmn+KGUvBq5+TS/Y9u0saRLncZ9Dn2Lwk0WR99zMos5e6bDbaz/dDCENjODJWpUWcZY3hDtIH7H8v061ZPx20= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K09CiIvB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K09CiIvB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3823C4CEC5; Mon, 9 Sep 2024 20:25:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725913528; bh=IoliWmKGaEhCYdKBghauwV3MP5okR9y80Qjj6G0/EN4=; h=From:To:Cc:Subject:Date:From; b=K09CiIvB+58xqQbvxhPjwyN28rZ465yImGKT8X4NdVANWyYJqvyRSBr9IsV2pT0Go SZ9vF3vORB5MDSFuDFLhEUlVsiyn/fcfoz8htrQU0ZyH24J/3CtLsfJPHs/rd+jmli g3nzju0myd42sdx92p3o+/Dd+lMaZXbXD955O6QIR0Sn4DBlRinkj/2Cm5LNF72fnO EvDITU4nbPh7hKX9z17suVxMdhVty3sDmAVth3tO4cgIEZn8GvboWvWAkaT+qdG4pH +BGf7LdobcHVw2s2Uwgd8OIUVg3HmNjRTNKYTDTX5rPC4HWJz99OqxzsDNHtz6/Sj7 /dX6WQrxEX5Kg== From: Arnd Bergmann To: Lucas De Marchi , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Rodrigo Vivi Cc: Arnd Bergmann , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Anshuman Gupta , Matthew Auld , Matthew Brost , Riana Tauro , Jonathan Cavitt , intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/xe: fix build warning with CONFIG_PM=n Date: Mon, 9 Sep 2024 20:25:08 +0000 Message-Id: <20240909202521.1018439-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The 'runtime_status' field is an implementation detail of the power management code, so a device driver should not normally touch this: drivers/gpu/drm/xe/xe_pm.c: In function 'xe_pm_suspending_or_resuming': drivers/gpu/drm/xe/xe_pm.c:606:26: error: 'struct dev_pm_info' has no membe= r named 'runtime_status' 606 | return dev->power.runtime_status =3D=3D RPM_SUSPENDING || | ^ drivers/gpu/drm/xe/xe_pm.c:607:27: error: 'struct dev_pm_info' has no membe= r named 'runtime_status' 607 | dev->power.runtime_status =3D=3D RPM_RESUMING; | ^ drivers/gpu/drm/xe/xe_pm.c:608:1: error: control reaches end of non-void fu= nction [-Werror=3Dreturn-type] Add an #ifdef check to avoid the build regression. Fixes: cb85e39dc5d1 ("drm/xe: Suppress missing outer rpm protection warning= ") Signed-off-by: Arnd Bergmann Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_pm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c index 9c59a30d7646..a3d1509066f7 100644 --- a/drivers/gpu/drm/xe/xe_pm.c +++ b/drivers/gpu/drm/xe/xe_pm.c @@ -601,10 +601,14 @@ bool xe_pm_runtime_get_if_in_use(struct xe_device *xe) */ static bool xe_pm_suspending_or_resuming(struct xe_device *xe) { +#ifdef CONFIG_PM struct device *dev =3D xe->drm.dev; =20 return dev->power.runtime_status =3D=3D RPM_SUSPENDING || dev->power.runtime_status =3D=3D RPM_RESUMING; +#else + return false; +#endif } =20 /** --=20 2.39.2