From: jacopo mondi <jacopo@jmondi.org>
To: Lubomir Rintel <lkundrak@v3.sk>
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rui Miguel Silva <rmfrfs@gmail.com>,
Shunqian Zheng <zhengsq@rock-chips.com>,
Jonathan Corbet <corbet@lwn.net>,
Wenyou Yang <wenyou.yang@microchip.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] media: v4l2-subdev: stub v4l2_subdev_get_try_format() ^[^[
Date: Mon, 3 Dec 2018 14:48:00 +0100 [thread overview]
Message-ID: <20181203134800.GA2901@w540> (raw)
In-Reply-To: <20181128171918.160643-2-lkundrak@v3.sk>
[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]
Hi Lubomir,
thanks for the patches
On Wed, Nov 28, 2018 at 06:19:13PM +0100, Lubomir Rintel wrote:
> Provide a dummy implementation when configured without
> CONFIG_VIDEO_V4L2_SUBDEV_API to avoid ifdef dance in the drivers that can
> be built either with or without the option.
>
> Suggested-by: Jacopo Mondi <jacopo@jmondi.org>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
> include/media/v4l2-subdev.h | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
> index 9102d6ca566e..906e28011bb4 100644
> --- a/include/media/v4l2-subdev.h
> +++ b/include/media/v4l2-subdev.h
> @@ -967,6 +967,17 @@ static inline struct v4l2_rect
> pad = 0;
> return &cfg[pad].try_compose;
> }
> +
> +#else /* !defined(CONFIG_VIDEO_V4L2_SUBDEV_API) */
> +
> +static inline struct v4l2_mbus_framefmt
> +*v4l2_subdev_get_try_format(struct v4l2_subdev *sd,
> + struct v4l2_subdev_pad_config *cfg,
> + unsigned int pad)
> +{
> + return ERR_PTR(-ENOTTY);
> +}
> +
> #endif
While at there, what about doing the same for get_try_crop and
get_try_compose? At lease provide stubs, I let you figure out if
you're willing to fix callers too, it seems there are quite a few of
them though
$ git grep v4l2_subdev_get_try* drivers/media/ | grep -v '_format' | wc -l
44
>
> extern const struct v4l2_file_operations v4l2_subdev_fops;
> --
> 2.19.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2018-12-03 13:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 17:19 [PATCH 0/6] media: don't ifdef v4l2_subdev_get_try_format() any more Lubomir Rintel
2018-11-28 17:19 ` [PATCH 1/6] media: v4l2-subdev: stub v4l2_subdev_get_try_format() Lubomir Rintel
2018-12-03 13:48 ` jacopo mondi [this message]
2018-12-04 15:01 ` [PATCH 1/6] media: v4l2-subdev: stub v4l2_subdev_get_try_format() ^[^[ Lubomir Rintel
2018-12-06 8:30 ` [PATCH 1/6] media: v4l2-subdev: stub v4l2_subdev_get_try_format() ?? jacopo mondi
2018-12-07 8:57 ` Hans Verkuil
2018-12-09 21:17 ` sakari.ailus
2018-11-28 17:19 ` [PATCH 2/6] media: ov7740: get rid of extra ifdefs Lubomir Rintel
2019-01-15 9:25 ` Sakari Ailus
2018-11-28 17:19 ` [PATCH 3/6] media: ov2659: " Lubomir Rintel
2018-12-03 10:42 ` Dan Carpenter
2018-11-28 17:19 ` [PATCH 4/6] media: ov2680: " Lubomir Rintel
2018-12-03 10:43 ` Dan Carpenter
2018-11-28 17:19 ` [PATCH 5/6] media: ov5695: " Lubomir Rintel
2018-11-28 17:19 ` [PATCH 6/6] media: ov7670: " Lubomir Rintel
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=20181203134800.GA2901@w540 \
--to=jacopo@jmondi.org \
--cc=corbet@lwn.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lkundrak@v3.sk \
--cc=mchehab@kernel.org \
--cc=prabhakar.csengg@gmail.com \
--cc=rmfrfs@gmail.com \
--cc=wenyou.yang@microchip.com \
--cc=zhengsq@rock-chips.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.