From: Jani Nikula <jani.nikula@linux.intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Petr Mladek <pmladek@suse.com>,
mchehab@kernel.org,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
hverkuil@xs4all.nl,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
laurent.pinchart@ideasonboard.com, Joe Perches <joe@perches.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCH v2 1/1] lib/vsprintf: Add support for printing V4L2 and DRM fourccs
Date: Mon, 06 Apr 2020 10:37:20 +0300 [thread overview]
Message-ID: <87wo6tkqtr.fsf@intel.com> (raw)
In-Reply-To: <20200406072857.GD5835@kekkonen.localdomain>
On Mon, 06 Apr 2020, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> On Fri, Apr 03, 2020 at 02:10:53PM +0200, Rasmus Villemoes wrote:
>> What's wrong with having a
>>
>> char *fourcc_string(char *buf, u32 x)
>>
>> that formats x into buf and returns buf, so it can be used in a
>>
>> char buf[8];
>> pr_debug("bla: %s\n", fourcc_string(buf, x))
>
> I guess that could be one option. But changing the implementation could
> require changing the size of all those buffers.
Not arguing one way or another, just observing that
drm_get_format_name() abstracts that by using:
struct drm_format_name_buf {
char str[32];
};
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Petr Mladek <pmladek@suse.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-media@vger.kernel.org,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.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>
Subject: Re: [PATCH v2 1/1] lib/vsprintf: Add support for printing V4L2 and DRM fourccs
Date: Mon, 06 Apr 2020 10:37:20 +0300 [thread overview]
Message-ID: <87wo6tkqtr.fsf@intel.com> (raw)
In-Reply-To: <20200406072857.GD5835@kekkonen.localdomain>
On Mon, 06 Apr 2020, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> On Fri, Apr 03, 2020 at 02:10:53PM +0200, Rasmus Villemoes wrote:
>> What's wrong with having a
>>
>> char *fourcc_string(char *buf, u32 x)
>>
>> that formats x into buf and returns buf, so it can be used in a
>>
>> char buf[8];
>> pr_debug("bla: %s\n", fourcc_string(buf, x))
>
> I guess that could be one option. But changing the implementation could
> require changing the size of all those buffers.
Not arguing one way or another, just observing that
drm_get_format_name() abstracts that by using:
struct drm_format_name_buf {
char str[32];
};
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2020-04-06 7:37 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 9:11 [PATCH v2 1/1] lib/vsprintf: Add support for printing V4L2 and DRM fourccs Sakari Ailus
2020-04-03 9:11 ` Sakari Ailus
2020-04-03 9:31 ` Andy Shevchenko
2020-04-03 9:31 ` Andy Shevchenko
2020-04-03 9:39 ` Sakari Ailus
2020-04-03 9:39 ` Sakari Ailus
2020-04-03 9:54 ` Andy Shevchenko
2020-04-03 9:54 ` Andy Shevchenko
2020-04-03 10:10 ` Sakari Ailus
2020-04-03 10:10 ` Sakari Ailus
2020-04-03 10:24 ` Laurent Pinchart
2020-04-03 10:24 ` Laurent Pinchart
2020-04-03 10:47 ` Sakari Ailus
2020-04-03 10:47 ` Sakari Ailus
2020-04-03 11:19 ` Mauro Carvalho Chehab
2020-04-03 11:19 ` Mauro Carvalho Chehab
2020-04-03 11:54 ` Andy Shevchenko
2020-04-03 11:54 ` Andy Shevchenko
2020-04-03 18:38 ` Joe Perches
2020-04-03 18:38 ` Joe Perches
2020-04-03 23:36 ` Sakari Ailus
2020-04-03 23:36 ` Sakari Ailus
2020-04-03 23:55 ` Joe Perches
2020-04-03 23:55 ` Joe Perches
2020-04-03 12:10 ` Rasmus Villemoes
2020-04-03 12:10 ` Rasmus Villemoes
2020-04-03 14:22 ` Mauro Carvalho Chehab
2020-04-03 14:22 ` Mauro Carvalho Chehab
2020-04-03 16:56 ` Joe Perches
2020-04-03 16:56 ` Joe Perches
2020-04-03 17:32 ` Mauro Carvalho Chehab
2020-04-03 17:32 ` Mauro Carvalho Chehab
2020-04-03 17:48 ` Joe Perches
2020-04-03 17:48 ` Joe Perches
2020-04-03 18:32 ` Andy Shevchenko
2020-04-03 18:32 ` Andy Shevchenko
2020-04-04 0:14 ` Sakari Ailus
2020-04-04 0:14 ` Sakari Ailus
2020-04-04 0:21 ` Laurent Pinchart
2020-04-04 0:21 ` Laurent Pinchart
2020-04-06 7:17 ` Sakari Ailus
2020-04-06 7:17 ` Sakari Ailus
2020-04-06 7:46 ` Mauro Carvalho Chehab
2020-04-06 7:46 ` Mauro Carvalho Chehab
2020-04-06 10:44 ` Andy Shevchenko
2020-04-06 10:44 ` Andy Shevchenko
2020-04-06 13:01 ` Joe Perches
2020-04-06 13:01 ` Joe Perches
2020-04-06 7:28 ` Sakari Ailus
2020-04-06 7:28 ` Sakari Ailus
2020-04-06 7:37 ` Jani Nikula [this message]
2020-04-06 7:37 ` Jani Nikula
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=87wo6tkqtr.fsf@intel.com \
--to=jani.nikula@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=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=sakari.ailus@linux.intel.com \
--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 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.