From: "andriy.shevchenko@linux.intel.com" <andriy.shevchenko@linux.intel.com>
To: Aditya Garg <gargaditya08@live.com>
Cc: "pmladek@suse.com" <pmladek@suse.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"linux@rasmusvillemoes.dk" <linux@rasmusvillemoes.dk>,
"senozhatsky@chromium.org" <senozhatsky@chromium.org>,
"corbet@lwn.net" <corbet@lwn.net>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
"mripard@kernel.org" <mripard@kernel.org>,
"tzimmermann@suse.de" <tzimmermann@suse.de>,
"airlied@gmail.com" <airlied@gmail.com>,
"simona@ffwll.ch" <simona@ffwll.ch>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"apw@canonical.com" <apw@canonical.com>,
"joe@perches.com" <joe@perches.com>,
"dwaipayanray1@gmail.com" <dwaipayanray1@gmail.com>,
"lukas.bulwahn@gmail.com" <lukas.bulwahn@gmail.com>,
"sumit.semwal@linaro.org" <sumit.semwal@linaro.org>,
"christian.koenig@amd.com" <christian.koenig@amd.com>,
"kekrby@gmail.com" <kekrby@gmail.com>,
"admin@kodeit.net" <admin@kodeit.net>,
Orlando Chamberlain <orlandoch.dev@gmail.com>,
"evepolonium@gmail.com" <evepolonium@gmail.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
Hector Martin <marcan@marcan.st>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"asahi@lists.linux.dev" <asahi@lists.linux.dev>,
Sven Peter <sven@svenpeter.dev>, Janne Grunau <j@jannau.net>
Subject: Re: [PATCH v2 2/3] lib/vsprintf: Add support for generic FOURCCs by extending %p4cc
Date: Mon, 24 Feb 2025 12:57:14 +0200 [thread overview]
Message-ID: <Z7xQikQeHLOHb1G8@smile.fi.intel.com> (raw)
In-Reply-To: <4DA18DF6-4C41-4D45-9DD4-B82E043B3320@live.com>
On Sun, Feb 23, 2025 at 03:16:28PM +0000, Aditya Garg wrote:
> > Looking at the header files, it looks like doing cpu_to_le32 on that variable and doing le32_to_cpu will actually reverse the order twice, on big endian systems, thus technically all way would not swap the order at all.
> >
> > I'm not really sure how to manage the sparse warnings here.
>
> Not sure whether the maintainers would like it, but we can do something like this:
This is not what we want, I believe. And this looks like a reinventing a wheel
of cpu_to_*() and *_to_cpu() or similar macros.
> case 'l’:
> #ifdef __LITTLE_ENDIAN
> val = orig;
> #else
> orig = swab32(orig);
> val = orig;
> #endif
> break;
>
> case 'b’:
> #ifdef __LITTLE_ENDIAN
> orig = swab32(orig);
> val = orig;
> #else
> val = orig;
> #endif
> break;
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-02-24 10:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <16F819E8-E866-4552-BB08-31486D2BA8C5@live.com>
2025-02-23 15:16 ` [PATCH v2 2/3] lib/vsprintf: Add support for generic FOURCCs by extending %p4cc Aditya Garg
2025-02-24 10:57 ` andriy.shevchenko [this message]
2025-02-23 6:39 Aditya Garg
2025-02-24 11:08 ` andriy.shevchenko
-- strict thread matches above, loose matches on Subject: below --
2025-02-20 16:38 [PATCH v2 1/3] drm/format-helper: Add conversion from XRGB8888 to BGR888 Aditya Garg
2025-02-20 16:39 ` [PATCH v2 2/3] lib/vsprintf: Add support for generic FOURCCs by extending %p4cc Aditya Garg
2025-02-21 10:29 ` Rasmus Villemoes
2025-02-21 11:40 ` Aditya Garg
2025-02-21 15:27 ` andriy.shevchenko
2025-02-21 19:35 ` Aditya Garg
2025-02-21 20:06 ` Aditya Garg
2025-02-21 20:23 ` andriy.shevchenko
2025-02-22 12:11 ` Aditya Garg
2025-02-22 15:46 ` Aditya Garg
2025-02-24 9:58 ` andriy.shevchenko
2025-02-24 10:18 ` Aditya Garg
2025-02-24 10:24 ` andriy.shevchenko
2025-02-24 10:32 ` Aditya Garg
2025-02-24 10:40 ` andriy.shevchenko
2025-02-24 10:43 ` Aditya Garg
2025-02-24 10:48 ` andriy.shevchenko
2025-02-24 10:52 ` Aditya Garg
2025-02-24 16:17 ` Aditya Garg
2025-02-27 11:21 ` Aditya Garg
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=Z7xQikQeHLOHb1G8@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=admin@kodeit.net \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=asahi@lists.linux.dev \
--cc=christian.koenig@amd.com \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=dwaipayanray1@gmail.com \
--cc=evepolonium@gmail.com \
--cc=gargaditya08@live.com \
--cc=j@jannau.net \
--cc=joe@perches.com \
--cc=kekrby@gmail.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@rasmusvillemoes.dk \
--cc=lukas.bulwahn@gmail.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marcan@marcan.st \
--cc=mripard@kernel.org \
--cc=orlandoch.dev@gmail.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=simona@ffwll.ch \
--cc=sumit.semwal@linaro.org \
--cc=sven@svenpeter.dev \
--cc=tzimmermann@suse.de \
/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