LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
Kees Cook <keescook@chromium.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD
Date: Tue, 8 May 2018 19:22:21 +0200 [thread overview]
Message-ID: <2a04c948-82ba-c69f-891e-303db85b66a4@xs4all.nl> (raw)
In-Reply-To: <20180508171759.GA184279@samitolvanen.mtv.corp.google.com>
On 05/08/2018 07:17 PM, Sami Tolvanen wrote:
> On Tue, May 08, 2018 at 10:18:24AM +0200, Hans Verkuil wrote:
>> Just call this v4l_stub_g_fbuf, conform the naming of the other functions.
>>
>> So just replace vidioc_ by v4l_stub_ in all these DEFINE_IOCTL_FNC macros.
>>
>> This way the function name in the big array matches the name in this macro,
>> and the 'stub' part indicates that it is just a stub function.
>
> vidioc_ is actually part of the function name in struct v4l2_ioctl_ops,
I'm stupid, I should have seen that.
> which the stub needs to call. I can change the stub name to start with
> v4l_stub_, but if you prefer to drop vidioc_ entirely from the name,
> the macro still wouldn't end up matching the array. It would have to be
> something like this:
>
> #define DEFINE_IOCTL_FNC(_vidioc) \
> static int v4l_stub_ ## _vidioc( \
> ...
> return ops->vidioc_ ## _vidioc(file, fh, p); \
> ...
> DEFINE_IOCTL_FNC(g_fbuf)
> ...
> static struct v4l2_ioctl_info v4l2_ioctls[] = {
> ...
> IOCTL_INFO(VIDIOC_G_FBUF, v4l_stub_g_fbuf, ...),
This looks good, I would just rename DEFINE_IOCTL_FNC to DEFINE_V4L_STUB_FUNC.
This makes it clear that it defines a v4l stub function.
Regards,
Hans
next prev parent reply other threads:[~2018-05-08 17:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 18:59 [PATCH] " Sami Tolvanen
2018-04-30 22:58 ` Kees Cook
2018-05-07 10:16 ` Hans Verkuil
2018-05-07 20:51 ` [PATCH v2] " Sami Tolvanen
2018-05-08 8:18 ` Hans Verkuil
2018-05-08 17:17 ` Sami Tolvanen
2018-05-08 17:22 ` Hans Verkuil [this message]
2018-05-08 17:27 ` Sami Tolvanen
2018-05-08 17:35 ` [PATCH v3] " Sami Tolvanen
2018-05-08 17:43 ` Hans Verkuil
2018-05-08 17:56 ` [PATCH v4] media: v4l2-ioctl: replace IOCTL_INFO_STD with stub functions Sami Tolvanen
2018-05-09 7:08 ` Hans Verkuil
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=2a04c948-82ba-c69f-891e-303db85b66a4@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@s-opensource.com \
--cc=samitolvanen@google.com \
--subject='Re: [PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD' \
/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
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).