All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: tvrtko.ursulin@linux.intel.com,
	alan.previn.teres.alexis@intel.com,
	intel-gfx@lists.freedesktop.org, patches@lists.linux.dev,
	dri-devel@lists.freedesktop.org, rodrigo.vivi@intel.com
Subject: Re: [Intel-gfx] [PATCH] drm/i915/pxp: Fix size_t format specifier in gsccs_send_message()
Date: Tue, 30 May 2023 21:39:02 +0200	[thread overview]
Message-ID: <ZHZQ1gAWjdDql4Oi@ashyti-mobl2.lan> (raw)
In-Reply-To: <20230530-i915-pxp-size_t-wformat-v1-1-9631081e2e5b@kernel.org>

Hi Nathan,

On Tue, May 30, 2023 at 11:37:56AM -0700, Nathan Chancellor wrote:
> When building ARCH=i386 allmodconfig, the following warning occurs:
> 
>   In file included from include/linux/device.h:15,
>                    from include/linux/node.h:18,
>                    from include/linux/cpu.h:17,
>                    from include/linux/static_call.h:135,
>                    from arch/x86/include/asm/perf_event.h:5,
>                    from include/linux/perf_event.h:25,
>                    from drivers/gpu/drm/i915/i915_pmu.h:11,
>                    from drivers/gpu/drm/i915/gt/intel_engine_types.h:21,
>                    from drivers/gpu/drm/i915/gt/intel_context_types.h:18,
>                    from drivers/gpu/drm/i915/gem/i915_gem_context_types.h:20,
>                    from drivers/gpu/drm/i915/i915_request.h:34,
>                    from drivers/gpu/drm/i915/i915_active.h:13,
>                    from drivers/gpu/drm/i915/gt/intel_context.h:13,
>                    from drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c:8:
>   drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c: In function 'gsccs_send_message':
>   include/drm/drm_print.h:456:39: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
>     456 |         dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
>         |                                       ^~~~~~~~
>   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
>     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
>         |                              ^~~
>   include/linux/dev_printk.h:146:61: note: in expansion of macro 'dev_fmt'
>     146 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
>         |                                                             ^~~~~~~
>   include/drm/drm_print.h:456:9: note: in expansion of macro 'dev_warn'
>     456 |         dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
>         |         ^~~~
>   include/drm/drm_print.h:466:9: note: in expansion of macro '__drm_printk'
>     466 |         __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
>         |         ^~~~~~~~~~~~
>   drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c:146:17: note: in expansion of macro 'drm_warn'
>     146 |                 drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%ld)\n",
>         |                 ^~~~~~~~
>   cc1: all warnings being treated as errors
> 
> Use the '%zu' format specifier, as the variable is a 'size_t'.
> 
> Fixes: dc9ac125d81f ("drm/i915/pxp: Add GSC-CS backend to send GSC fw messages")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

yes, as specified in Documentation/core-api/printk-formats.rst.

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> 

Thanks,
Andi

WARNING: multiple messages have this Message-ID (diff)
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: alan.previn.teres.alexis@intel.com,
	intel-gfx@lists.freedesktop.org, patches@lists.linux.dev,
	dri-devel@lists.freedesktop.org, rodrigo.vivi@intel.com
Subject: Re: [Intel-gfx] [PATCH] drm/i915/pxp: Fix size_t format specifier in gsccs_send_message()
Date: Tue, 30 May 2023 21:39:02 +0200	[thread overview]
Message-ID: <ZHZQ1gAWjdDql4Oi@ashyti-mobl2.lan> (raw)
In-Reply-To: <20230530-i915-pxp-size_t-wformat-v1-1-9631081e2e5b@kernel.org>

Hi Nathan,

On Tue, May 30, 2023 at 11:37:56AM -0700, Nathan Chancellor wrote:
> When building ARCH=i386 allmodconfig, the following warning occurs:
> 
>   In file included from include/linux/device.h:15,
>                    from include/linux/node.h:18,
>                    from include/linux/cpu.h:17,
>                    from include/linux/static_call.h:135,
>                    from arch/x86/include/asm/perf_event.h:5,
>                    from include/linux/perf_event.h:25,
>                    from drivers/gpu/drm/i915/i915_pmu.h:11,
>                    from drivers/gpu/drm/i915/gt/intel_engine_types.h:21,
>                    from drivers/gpu/drm/i915/gt/intel_context_types.h:18,
>                    from drivers/gpu/drm/i915/gem/i915_gem_context_types.h:20,
>                    from drivers/gpu/drm/i915/i915_request.h:34,
>                    from drivers/gpu/drm/i915/i915_active.h:13,
>                    from drivers/gpu/drm/i915/gt/intel_context.h:13,
>                    from drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c:8:
>   drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c: In function 'gsccs_send_message':
>   include/drm/drm_print.h:456:39: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
>     456 |         dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
>         |                                       ^~~~~~~~
>   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
>     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
>         |                              ^~~
>   include/linux/dev_printk.h:146:61: note: in expansion of macro 'dev_fmt'
>     146 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
>         |                                                             ^~~~~~~
>   include/drm/drm_print.h:456:9: note: in expansion of macro 'dev_warn'
>     456 |         dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
>         |         ^~~~
>   include/drm/drm_print.h:466:9: note: in expansion of macro '__drm_printk'
>     466 |         __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
>         |         ^~~~~~~~~~~~
>   drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c:146:17: note: in expansion of macro 'drm_warn'
>     146 |                 drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%ld)\n",
>         |                 ^~~~~~~~
>   cc1: all warnings being treated as errors
> 
> Use the '%zu' format specifier, as the variable is a 'size_t'.
> 
> Fixes: dc9ac125d81f ("drm/i915/pxp: Add GSC-CS backend to send GSC fw messages")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

yes, as specified in Documentation/core-api/printk-formats.rst.

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> 

Thanks,
Andi

WARNING: multiple messages have this Message-ID (diff)
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
	rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com,
	alan.previn.teres.alexis@intel.com,
	intel-gfx@lists.freedesktop.org, patches@lists.linux.dev,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/pxp: Fix size_t format specifier in gsccs_send_message()
Date: Tue, 30 May 2023 21:39:02 +0200	[thread overview]
Message-ID: <ZHZQ1gAWjdDql4Oi@ashyti-mobl2.lan> (raw)
In-Reply-To: <20230530-i915-pxp-size_t-wformat-v1-1-9631081e2e5b@kernel.org>

Hi Nathan,

On Tue, May 30, 2023 at 11:37:56AM -0700, Nathan Chancellor wrote:
> When building ARCH=i386 allmodconfig, the following warning occurs:
> 
>   In file included from include/linux/device.h:15,
>                    from include/linux/node.h:18,
>                    from include/linux/cpu.h:17,
>                    from include/linux/static_call.h:135,
>                    from arch/x86/include/asm/perf_event.h:5,
>                    from include/linux/perf_event.h:25,
>                    from drivers/gpu/drm/i915/i915_pmu.h:11,
>                    from drivers/gpu/drm/i915/gt/intel_engine_types.h:21,
>                    from drivers/gpu/drm/i915/gt/intel_context_types.h:18,
>                    from drivers/gpu/drm/i915/gem/i915_gem_context_types.h:20,
>                    from drivers/gpu/drm/i915/i915_request.h:34,
>                    from drivers/gpu/drm/i915/i915_active.h:13,
>                    from drivers/gpu/drm/i915/gt/intel_context.h:13,
>                    from drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c:8:
>   drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c: In function 'gsccs_send_message':
>   include/drm/drm_print.h:456:39: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
>     456 |         dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
>         |                                       ^~~~~~~~
>   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
>     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
>         |                              ^~~
>   include/linux/dev_printk.h:146:61: note: in expansion of macro 'dev_fmt'
>     146 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
>         |                                                             ^~~~~~~
>   include/drm/drm_print.h:456:9: note: in expansion of macro 'dev_warn'
>     456 |         dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
>         |         ^~~~
>   include/drm/drm_print.h:466:9: note: in expansion of macro '__drm_printk'
>     466 |         __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
>         |         ^~~~~~~~~~~~
>   drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c:146:17: note: in expansion of macro 'drm_warn'
>     146 |                 drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%ld)\n",
>         |                 ^~~~~~~~
>   cc1: all warnings being treated as errors
> 
> Use the '%zu' format specifier, as the variable is a 'size_t'.
> 
> Fixes: dc9ac125d81f ("drm/i915/pxp: Add GSC-CS backend to send GSC fw messages")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

yes, as specified in Documentation/core-api/printk-formats.rst.

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> 

Thanks,
Andi

  reply	other threads:[~2023-05-30 19:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 18:37 [PATCH] drm/i915/pxp: Fix size_t format specifier in gsccs_send_message() Nathan Chancellor
2023-05-30 18:37 ` [Intel-gfx] " Nathan Chancellor
2023-05-30 18:37 ` Nathan Chancellor
2023-05-30 19:39 ` Andi Shyti [this message]
2023-05-30 19:39   ` [Intel-gfx] " Andi Shyti
2023-05-30 19:39   ` Andi Shyti
2023-06-02 15:17   ` Jani Nikula
2023-06-02 15:17     ` Jani Nikula
2023-06-02 15:17     ` Jani Nikula
2023-05-31 15:23 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2023-05-31 15:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-06-02  2:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=ZHZQ1gAWjdDql4Oi@ashyti-mobl2.lan \
    --to=andi.shyti@linux.intel.com \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nathan@kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=rodrigo.vivi@intel.com \
    --cc=tvrtko.ursulin@linux.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.