From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: linux-media@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Petr Mladek <pmladek@suse.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
dri-devel@lists.freedesktop.org, hverkuil@xs4all.nl,
laurent.pinchart@ideasonboard.com, mchehab@kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Joe Perches <joe@perches.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: [PATCH v6 0/3] Add %p4cc printk modifier for V4L2 and DRM fourcc codes
Date: Mon, 8 Feb 2021 22:09:00 +0200 [thread overview]
Message-ID: <20210208200903.28084-1-sakari.ailus@linux.intel.com> (raw)
Hi all,
This set adds support for %p4cc printk modifier for printing V4L2 and DRM
fourcc codes. The codes are cumbersome to print manually and by adding the
modifier, this task is saved from the V4L2 and DRM frameworks as well as
related drivers. DRM actually had it handled in a way (see 3rd patch) but
the printk modifier makes printing the format easier even there. On V4L2
side it saves quite a few lines of repeating different implementations of
printing the 4cc codes.
Further work will include converting the V4L2 drivers doing the same, as
well as converting DRM drivers from drm_get_format_name() to plain %p4cc.
I left these out from this version since individual drivers are easier
changed without dealing with multiple trees.
If DRM folks would prefer to convert drivers to %p4cc directly instead I
have no problem dropping the 3rd patch. Nearly all uses in DRM are in
printk family of functions that can readily use %p4cc instead of the
current arrangement that relies on caller-allocated temporary buffer.
Since v5:
- Added V4L2 core conversion to %p4cc, as well as change the DRM
fourcc printing function to use %p4cc.
- Add missing checkpatch.pl checks for %p4cc modifier.
Sakari Ailus (3):
lib/vsprintf: Add support for printing V4L2 and DRM fourccs
v4l: ioctl: Use %p4cc printk modifier to print FourCC codes
drm/fourcc: Switch to %p4cc format modifier
Documentation/core-api/printk-formats.rst | 16 +++++
drivers/gpu/drm/drm_fourcc.c | 16 +----
drivers/media/v4l2-core/v4l2-ioctl.c | 85 ++++++-----------------
lib/test_printf.c | 17 +++++
lib/vsprintf.c | 51 ++++++++++++++
scripts/checkpatch.pl | 6 +-
6 files changed, 112 insertions(+), 79 deletions(-)
--
2.29.2
next reply other threads:[~2021-02-08 21:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 20:09 Sakari Ailus [this message]
2021-02-08 20:09 ` [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs Sakari Ailus
2021-02-08 20:43 ` Andy Shevchenko
2021-02-08 20:58 ` Andy Shevchenko
2021-02-09 10:01 ` Andy Shevchenko
2021-02-09 9:20 ` Sakari Ailus
2021-02-09 9:58 ` Andy Shevchenko
2021-02-09 17:47 ` Sakari Ailus
2021-02-11 17:14 ` Petr Mladek
2021-02-12 11:28 ` Sakari Ailus
2021-02-12 12:06 ` Petr Mladek
2021-02-08 20:09 ` [PATCH v6 2/3] v4l: ioctl: Use %p4cc printk modifier to print FourCC codes Sakari Ailus
2021-02-11 16:31 ` Petr Mladek
2021-02-12 10:01 ` Sakari Ailus
2021-02-08 20:09 ` [PATCH v6 3/3] drm/fourcc: Switch to %p4cc format modifier Sakari Ailus
2021-02-09 7:27 ` Daniel Vetter
2021-02-09 9:03 ` Sakari Ailus
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=20210208200903.28084-1-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hverkuil@xs4all.nl \
--cc=jani.nikula@linux.intel.com \
--cc=joe@perches.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mchehab@kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.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