public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: "Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Anshuman Gupta" <anshuman.gupta@intel.com>,
	"Matthew Auld" <matthew.auld@intel.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Riana Tauro" <riana.tauro@intel.com>,
	"Jonathan Cavitt" <jonathan.cavitt@intel.com>,
	intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/xe: fix build warning with CONFIG_PM=n
Date: Mon, 9 Sep 2024 16:47:28 -0400	[thread overview]
Message-ID: <Zt9e4K-MGEqt4QhC@intel.com> (raw)
In-Reply-To: <20240909202521.1018439-1-arnd@kernel.org>

On Mon, Sep 09, 2024 at 08:25:08PM +0000, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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 member named 'runtime_status'
>   606 |         return dev->power.runtime_status == RPM_SUSPENDING ||
>       |                          ^
> drivers/gpu/drm/xe/xe_pm.c:607:27: error: 'struct dev_pm_info' has no member named 'runtime_status'
>   607 |                 dev->power.runtime_status == RPM_RESUMING;
>       |                           ^
> drivers/gpu/drm/xe/xe_pm.c:608:1: error: control reaches end of non-void function [-Werror=return-type]
> 
> Add an #ifdef check to avoid the build regression.
> 

Thank you

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

pushing now...

> Fixes: cb85e39dc5d1 ("drm/xe: Suppress missing outer rpm protection warning")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  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 = xe->drm.dev;
>  
>  	return dev->power.runtime_status == RPM_SUSPENDING ||
>  		dev->power.runtime_status == RPM_RESUMING;
> +#else
> +	return false;
> +#endif
>  }
>  
>  /**
> -- 
> 2.39.2
> 

      reply	other threads:[~2024-09-09 20:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 20:25 [PATCH] drm/xe: fix build warning with CONFIG_PM=n Arnd Bergmann
2024-09-09 20:47 ` Rodrigo Vivi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zt9e4K-MGEqt4QhC@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=airlied@gmail.com \
    --cc=anshuman.gupta@intel.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.auld@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=mripard@kernel.org \
    --cc=riana.tauro@intel.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox