mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Matt Roper" <matthew.d.roper@intel.com>,
	"Arnd Bergmann" <arnd@kernel.org>
Cc: "Matthew Brost" <matthew.brost@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Dave Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Dnyaneshwar Bhadane" <dnyaneshwar.bhadane@intel.com>,
	"Lucas De Marchi" <demarchi@kernel.org>,
	"Tvrtko Ursulin" <tvrtko.ursulin@igalia.com>,
	"Umesh Nerlige Ramappa" <umesh.nerlige.ramappa@intel.com>,
	"Raag Jadav" <raag.jadav@intel.com>,
	"Niranjana Vishwanathapura" <niranjana.vishwanathapura@intel.com>,
	intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/xe: use %z format string for ptrdiff_t
Date: Tue, 17 Mar 2026 00:07:57 +0100	[thread overview]
Message-ID: <e46c3681-6f5f-4a41-b5bf-72627b4ec87a@app.fastmail.com> (raw)
In-Reply-To: <20260316225118.GD2729713@mdroper-desk1.amr.corp.intel.com>

On Mon, Mar 16, 2026, at 23:51, Matt Roper wrote:
> On Mon, Mar 16, 2026 at 11:43:46PM +0100, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> ptrdiff_t, size_t and long are the same size on all supported architectures,
>> but gcc requires the use of the %zx modifier instead of %lx. On 32-bit
>
> Nathan Chancellor just sent a fix here:
>
> https://lore.kernel.org/all/20260316-drm-xe-fix-32-bit-wformat-ptrdiff-v1-1-0108b10b2b6b@kernel.org/
>
> His solution uses %tx rather than %zx, which according to
> Documentation/core-api/printk-formats.rst sounds like it's probably the
> most accurate format string for this case?
>

Right, Nathan's version is correct. I wasn't aware that size_t
and ptrdiff_t have different modifiers.

      Arnd

  reply	other threads:[~2026-03-16 23:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 22:43 Arnd Bergmann
2026-03-16 22:51 ` Matt Roper
2026-03-16 23:07   ` Arnd Bergmann [this message]
2026-03-17 14:56     ` David Laight
2026-03-17 16:46       ` David Laight

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=e46c3681-6f5f-4a41-b5bf-72627b4ec87a@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=airlied@gmail.com \
    --cc=arnd@kernel.org \
    --cc=demarchi@kernel.org \
    --cc=dnyaneshwar.bhadane@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.brost@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=niranjana.vishwanathapura@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tvrtko.ursulin@igalia.com \
    --cc=umesh.nerlige.ramappa@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

all inboxes | Powered by JetHome®