linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: remove h from printk format specifier
@ 2020-12-15 14:41 trix
  2020-12-15 18:13 ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: trix @ 2020-12-15 14:41 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel,
	chris, tvrtko.ursulin, daniele.ceraolospurio,
	tejaskumarx.surendrakumar.upadhyay, lionel.g.landwerlin,
	venkata.s.dhanalakota
  Cc: intel-gfx, dri-devel, linux-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

See Documentation/core-api/printk-formats.rst.
h should no longer be used in the format specifier for printk.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpu/drm/i915/gt/intel_sseu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_sseu.c b/drivers/gpu/drm/i915/gt/intel_sseu.c
index 8a72e0fe34ca..80be9e818a6b 100644
--- a/drivers/gpu/drm/i915/gt/intel_sseu.c
+++ b/drivers/gpu/drm/i915/gt/intel_sseu.c
@@ -755,7 +755,7 @@ void intel_sseu_print_topology(const struct sseu_dev_info *sseu,
 		for (ss = 0; ss < sseu->max_subslices; ss++) {
 			u16 enabled_eus = sseu_get_eus(sseu, s, ss);
 
-			drm_printf(p, "\tsubslice%d: %u EUs (0x%hx)\n",
+			drm_printf(p, "\tsubslice%d: %u EUs (0x%x)\n",
 				   ss, hweight16(enabled_eus), enabled_eus);
 		}
 	}
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: remove h from printk format specifier
  2020-12-15 14:41 [PATCH] drm/i915: remove h from printk format specifier trix
@ 2020-12-15 18:13 ` Chris Wilson
  2020-12-15 19:00   ` Tom Rix
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2020-12-15 18:13 UTC (permalink / raw)
  To: airlied, daniel, daniele.ceraolospurio, jani.nikula,
	joonas.lahtinen, lionel.g.landwerlin, rodrigo.vivi,
	tejaskumarx.surendrakumar.upadhyay, trix, tvrtko.ursulin,
	venkata.s.dhanalakota
  Cc: intel-gfx, dri-devel, linux-kernel, Tom Rix

Quoting trix@redhat.com (2020-12-15 14:41:01)
> From: Tom Rix <trix@redhat.com>
> 
> See Documentation/core-api/printk-formats.rst.
> h should no longer be used in the format specifier for printk.

It's understood by format_decode().
* 'h', 'l', or 'L' for integer fields

At least reference commit cbacb5ab0aa0 ("docs: printk-formats: Stop
encouraging use of unnecessary %h[xudi] and %hh[xudi]") as to why the
printk-formats.rst was altered so we know the code is merely in bad
taste and not using undefined behaviour of printk.
-Chris

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: remove h from printk format specifier
  2020-12-15 18:13 ` Chris Wilson
@ 2020-12-15 19:00   ` Tom Rix
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Rix @ 2020-12-15 19:00 UTC (permalink / raw)
  To: Chris Wilson, airlied, daniel, daniele.ceraolospurio,
	jani.nikula, joonas.lahtinen, lionel.g.landwerlin, rodrigo.vivi,
	tejaskumarx.surendrakumar.upadhyay, tvrtko.ursulin,
	venkata.s.dhanalakota
  Cc: intel-gfx, dri-devel, linux-kernel


On 12/15/20 10:13 AM, Chris Wilson wrote:
> Quoting trix@redhat.com (2020-12-15 14:41:01)
>> From: Tom Rix <trix@redhat.com>
>>
>> See Documentation/core-api/printk-formats.rst.
>> h should no longer be used in the format specifier for printk.
> It's understood by format_decode().
> * 'h', 'l', or 'L' for integer fields
>
> At least reference commit cbacb5ab0aa0 ("docs: printk-formats: Stop
> encouraging use of unnecessary %h[xudi] and %hh[xudi]") as to why the
> printk-formats.rst was altered so we know the code is merely in bad
> taste and not using undefined behaviour of printk.

Ok, i will fix this after the first run of patches.

Tom

> -Chris
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-15 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 14:41 [PATCH] drm/i915: remove h from printk format specifier trix
2020-12-15 18:13 ` Chris Wilson
2020-12-15 19:00   ` Tom Rix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).