Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Summers, Stuart" <stuart.summers@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"De Marchi, Lucas" <lucas.demarchi@intel.com>
Cc: lkp <lkp@intel.com>, "Souza, Jose" <jose.souza@intel.com>
Subject: Re: [PATCH] drm/xe/guc: Fix size_t print format
Date: Wed, 29 Jan 2025 19:26:25 +0000	[thread overview]
Message-ID: <d70d72bede522da63143bd4e318a787516e12627.camel@intel.com> (raw)
In-Reply-To: <20250128154242.3371687-1-lucas.demarchi@intel.com>

On Tue, 2025-01-28 at 07:42 -0800, Lucas De Marchi wrote:
> Use %zx format to print size_t to remove the following warning when
> building for i386:
> 
>    include/linux/vmstat.h:518:36: warning: arithmetic between
> different enumeration types ('enum node_stat_item' and 'enum
> lru_list') [-Wenum-enum-conversion]
>      518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; //
> skip "nr_"
>          |                               ~~~~~~~~~~~ ^ ~~~
> > > drivers/gpu/drm/xe/xe_guc_ct.c:1727:43: warning: format specifies
> > > type 'unsigned long' but the argument has type 'size_t' (aka
> > > 'unsigned int') [-Wformat]
>     1727 |                         drm_printf(p, "[CTB].length:
> 0x%lx\n", snapshot->ctb_size);
>          |                                                       
> ~~~     ^~~~~~~~~~~~~~~~~~
>          |                                                        %zx
> 
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes:
> https://lore.kernel.org/oe-kbuild-all/202501281627.H6nj184e-lkp@intel.com/
> Fixes: cb1f868ca137 ("drm/xe: Make GUC binaries dump consistent with
> other binaries in devcoredump")
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

Reviewed-by: Stuart Summers <stuart.summers@intel.com>

For the test failure, looks like a ci-buglog issue not reporting the
right logs...

[763.452445] [114/122] (681s left) xe_drm_fdinfo (utilization-others-
idle)
[763.517537] Starting subtest: utilization-others-idle
[770.545124] Subtest utilization-others-idle: SUCCESS (7.026s)

Test seems fine.

> ---
>  drivers/gpu/drm/xe/xe_guc_ct.c  | 2 +-
>  drivers/gpu/drm/xe/xe_guc_log.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c
> b/drivers/gpu/drm/xe/xe_guc_ct.c
> index 497036675a38c..72ad576fc18eb 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -1724,7 +1724,7 @@ void xe_guc_ct_snapshot_print(struct
> xe_guc_ct_snapshot *snapshot,
>                            snapshot->g2h_outstanding);
>  
>                 if (snapshot->ctb) {
> -                       drm_printf(p, "[CTB].length: 0x%lx\n",
> snapshot->ctb_size);
> +                       drm_printf(p, "[CTB].length: 0x%zx\n",
> snapshot->ctb_size);
>                         xe_print_blob_ascii85(p, "[CTB].data", '\n',
>                                               snapshot->ctb, 0,
> snapshot->ctb_size);
>                 }
> diff --git a/drivers/gpu/drm/xe/xe_guc_log.c
> b/drivers/gpu/drm/xe/xe_guc_log.c
> index ab97ac728d7a8..80514a446ba28 100644
> --- a/drivers/gpu/drm/xe/xe_guc_log.c
> +++ b/drivers/gpu/drm/xe/xe_guc_log.c
> @@ -204,7 +204,7 @@ void xe_guc_log_snapshot_print(struct
> xe_guc_log_snapshot *snapshot, struct drm_
>         drm_printf(p, "GuC timestamp: 0x%08llX [%llu]\n", snapshot-
> >stamp, snapshot->stamp);
>         drm_printf(p, "Log level: %u\n", snapshot->level);
>  
> -       drm_printf(p, "[LOG].length: 0x%lx\n", snapshot->size);
> +       drm_printf(p, "[LOG].length: 0x%zx\n", snapshot->size);
>         remain = snapshot->size;
>         for (i = 0; i < snapshot->num_chunks; i++) {
>                 size_t size = min(GUC_LOG_CHUNK_SIZE, remain);


  parent reply	other threads:[~2025-01-29 19:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28 15:42 [PATCH] drm/xe/guc: Fix size_t print format Lucas De Marchi
2025-01-28 16:41 ` ✓ CI.Patch_applied: success for " Patchwork
2025-01-28 16:41 ` ✗ CI.checkpatch: warning " Patchwork
2025-01-28 16:42 ` ✓ CI.KUnit: success " Patchwork
2025-01-28 16:59 ` ✓ CI.Build: " Patchwork
2025-01-28 17:01 ` ✓ CI.Hooks: " Patchwork
2025-01-28 17:02 ` ✓ CI.checksparse: " Patchwork
2025-01-28 17:22 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-28 22:47 ` [PATCH] " Rodrigo Vivi
2025-01-29  5:41 ` ✗ Xe.CI.Full: failure for " Patchwork
2025-01-29 19:01   ` Lucas De Marchi
2025-01-29 19:26 ` Summers, Stuart [this message]
2025-01-29 19:47   ` [PATCH] " Lucas De Marchi

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=d70d72bede522da63143bd4e318a787516e12627.camel@intel.com \
    --to=stuart.summers@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jose.souza@intel.com \
    --cc=lkp@intel.com \
    --cc=lucas.demarchi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox