All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "José Roberto de Souza" <jose.souza@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v4 2/3] drm/xe: Fix definition of intel_wakeref_t
Date: Thu, 04 Jan 2024 18:56:31 +0200	[thread overview]
Message-ID: <87a5plyr40.fsf@intel.com> (raw)
In-Reply-To: <20240104162411.56085-2-jose.souza@intel.com>

On Thu, 04 Jan 2024, José Roberto de Souza <jose.souza@intel.com> wrote:
> i915 defines it as unsigned long so Xe should do the same to avoid
> compilation warnings:
>
>   CC [M]  drivers/gpu/drm/i915/i915_gem.o
>   CC [M]  drivers/gpu/drm/xe/i915-display/intel_display_power_well.o
> In file included from ./include/drm/drm_mm.h:51,
>                  from drivers/gpu/drm/xe/xe_bo_types.h:11,
>                  from drivers/gpu/drm/xe/xe_bo.h:11,
>                  from ./drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h:11,
>                  from ./drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h:15,
>                  from drivers/gpu/drm/i915/display/intel_display_power.c:8:
> drivers/gpu/drm/i915/display/intel_display_power.c: In function ‘print_async_put_domains_state’:
> drivers/gpu/drm/i915/display/intel_display_power.c:408:29: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘int’ [-Wformat=]
>   408 |         drm_dbg(&i915->drm, "async_put_wakeref %lu\n",
>       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~
>   409 |                 power_domains->async_put_wakeref);
>       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                              |
>       |                              int
> ./include/drm/drm_print.h:410:39: note: in definition of macro ‘drm_dev_dbg’
>   410 |         __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
>       |                                       ^~~
> ./include/drm/drm_print.h:510:33: note: in expansion of macro ‘drm_dbg_driver’
>   510 | #define drm_dbg(drm, fmt, ...)  drm_dbg_driver(drm, fmt, ##__VA_ARGS__)
>       |                                 ^~~~~~~~~~~~~~
> drivers/gpu/drm/i915/display/intel_display_power.c:408:9: note: in expansion of macro ‘drm_dbg’
>   408 |         drm_dbg(&i915->drm, "async_put_wakeref %lu\n",
>       |         ^~~~~~~
> drivers/gpu/drm/i915/display/intel_display_power.c:408:50: note: format string is defined here
>   408 |         drm_dbg(&i915->drm, "async_put_wakeref %lu\n",
>       |                                                ~~^
>       |                                                  |
>       |                                                  long unsigned int
>       |                                                %u
>   CC [M]  drivers/gpu/drm/i915/i915_gem_evict.o
>   CC [M]  drivers/gpu/drm/i915/i915_gem_gtt.o
>   CC [M]  drivers/gpu/drm/xe/i915-display/intel_display_trace.o
>   CC [M]  drivers/gpu/drm/xe/i915-display/intel_display_wa.o
>   CC [M]  drivers/gpu/drm/i915/i915_query.o
>
> Fixes: 44e694958b95 ("drm/xe/display: Implement display support")
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>

I think the real issue is that we're trying to print the value of
something that's supposed to be an opaque cookie, and the fix for that
is [1].

However, no harm in syncing the types.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


[1] https://patchwork.freedesktop.org/patch/msgid/20240104164600.783371-1-jani.nikula@intel.com


> ---
>  drivers/gpu/drm/xe/compat-i915-headers/intel_wakeref.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/intel_wakeref.h b/drivers/gpu/drm/xe/compat-i915-headers/intel_wakeref.h
> index 1c5e30cf10caa..ecb1c07077069 100644
> --- a/drivers/gpu/drm/xe/compat-i915-headers/intel_wakeref.h
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/intel_wakeref.h
> @@ -5,4 +5,4 @@
>  
>  #include <linux/types.h>
>  
> -typedef bool intel_wakeref_t;
> +typedef unsigned long intel_wakeref_t;

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-01-04 16:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04 16:24 [PATCH v4 1/3] drm/i915: Disable DSB in Xe KMD José Roberto de Souza
2024-01-04 16:24 ` [PATCH v4 2/3] drm/xe: Fix definition of intel_wakeref_t José Roberto de Souza
2024-01-04 16:56   ` Jani Nikula [this message]
2024-01-04 16:24 ` [PATCH v4 3/3] drm/xe: Use intel_wakeref_t in intel_runtime_pm functions José Roberto de Souza
2024-01-04 16:58   ` Jani Nikula
2024-01-04 20:24 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v4,1/3] drm/i915: Disable DSB in Xe KMD Patchwork
2024-01-04 20:24 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-01-04 20:28 ` ✓ CI.Patch_applied: success " Patchwork
2024-01-04 20:28 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-04 20:29 ` ✓ CI.KUnit: success " Patchwork
2024-01-04 20:32 ` ✗ CI.Build: failure " Patchwork
2024-01-04 20:38 ` ✓ Fi.CI.BAT: success " Patchwork
2024-01-04 22:06 ` ✓ Fi.CI.IGT: " Patchwork

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=87a5plyr40.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jose.souza@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.