From: Hans Verkuil <hverkuil@xs4all.nl>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
Mauro Carvalho Chehab <m.chehab@samsung.com>,
Hans Verkuil <hans.verkuil@cisco.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org, Sakari Ailus <sakari.ailus@iki.fi>
Cc: devel@driverdev.osuosl.org, linux-doc@vger.kernel.org,
linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 10/10] [media] v4l: Forbid usage of V4L2_MBUS_FMT definitions inside the kernel
Date: Mon, 10 Nov 2014 12:09:19 +0100 [thread overview]
Message-ID: <54609CDF.8030303@xs4all.nl> (raw)
In-Reply-To: <1415461632-31236-1-git-send-email-boris.brezillon@free-electrons.com>
On 11/08/2014 04:47 PM, Boris Brezillon wrote:
> Place v4l2_mbus_pixelcode in a #ifndef __KERNEL__ section so that kernel
> users don't have access to these definitions.
>
> We have to keep this definition for user-space users even though they're
> encouraged to move to the new media_bus_format enum.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> include/uapi/linux/v4l2-mediabus.h | 45 ++++++++++++++++++++++++--------------
> 1 file changed, 28 insertions(+), 17 deletions(-)
>
> diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h
> index d712df8..5c9410d 100644
> --- a/include/uapi/linux/v4l2-mediabus.h
> +++ b/include/uapi/linux/v4l2-mediabus.h
> @@ -15,6 +15,33 @@
> #include <linux/types.h>
> #include <linux/videodev2.h>
>
> +/**
> + * struct v4l2_mbus_framefmt - frame format on the media bus
> + * @width: frame width
> + * @height: frame height
> + * @code: data format code (from enum v4l2_mbus_pixelcode)
> + * @field: used interlacing type (from enum v4l2_field)
> + * @colorspace: colorspace of the data (from enum v4l2_colorspace)
> + */
> +struct v4l2_mbus_framefmt {
> + __u32 width;
> + __u32 height;
> + __u32 code;
> + __u32 field;
> + __u32 colorspace;
> + __u32 reserved[7];
> +};
> +
> +#ifndef __KERNEL__
> +/*
> + * enum v4l2_mbus_pixelcode and its definitions are now deprecated, and
> + * MEDIA_BUS_FMT_ definitions (defined in media-bus-format.h) should be
> + * used instead.
> + *
> + * New defines should only be added to media-bus-format.h. The
> + * v4l2_mbus_pixelcode enum is frozen.
> + */
> +
> #define V4L2_MBUS_FROM_MEDIA_BUS_FMT(name) \
> MEDIA_BUS_FMT_ ## name = V4L2_MBUS_FMT_ ## name
Shouldn't this be the other way around?
V4L2_MBUS_FMT_ ## name = MEDIA_BUS_FMT_ ## name
Regards,
Hans
>
> @@ -102,22 +129,6 @@ enum v4l2_mbus_pixelcode {
>
> V4L2_MBUS_FROM_MEDIA_BUS_FMT(AHSV8888_1X32),
> };
> -
> -/**
> - * struct v4l2_mbus_framefmt - frame format on the media bus
> - * @width: frame width
> - * @height: frame height
> - * @code: data format code (from enum v4l2_mbus_pixelcode)
> - * @field: used interlacing type (from enum v4l2_field)
> - * @colorspace: colorspace of the data (from enum v4l2_colorspace)
> - */
> -struct v4l2_mbus_framefmt {
> - __u32 width;
> - __u32 height;
> - __u32 code;
> - __u32 field;
> - __u32 colorspace;
> - __u32 reserved[7];
> -};
> +#endif /* __KERNEL__ */
>
> #endif
>
WARNING: multiple messages have this Message-ID (diff)
From: hverkuil@xs4all.nl (Hans Verkuil)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 10/10] [media] v4l: Forbid usage of V4L2_MBUS_FMT definitions inside the kernel
Date: Mon, 10 Nov 2014 12:09:19 +0100 [thread overview]
Message-ID: <54609CDF.8030303@xs4all.nl> (raw)
In-Reply-To: <1415461632-31236-1-git-send-email-boris.brezillon@free-electrons.com>
On 11/08/2014 04:47 PM, Boris Brezillon wrote:
> Place v4l2_mbus_pixelcode in a #ifndef __KERNEL__ section so that kernel
> users don't have access to these definitions.
>
> We have to keep this definition for user-space users even though they're
> encouraged to move to the new media_bus_format enum.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> include/uapi/linux/v4l2-mediabus.h | 45 ++++++++++++++++++++++++--------------
> 1 file changed, 28 insertions(+), 17 deletions(-)
>
> diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h
> index d712df8..5c9410d 100644
> --- a/include/uapi/linux/v4l2-mediabus.h
> +++ b/include/uapi/linux/v4l2-mediabus.h
> @@ -15,6 +15,33 @@
> #include <linux/types.h>
> #include <linux/videodev2.h>
>
> +/**
> + * struct v4l2_mbus_framefmt - frame format on the media bus
> + * @width: frame width
> + * @height: frame height
> + * @code: data format code (from enum v4l2_mbus_pixelcode)
> + * @field: used interlacing type (from enum v4l2_field)
> + * @colorspace: colorspace of the data (from enum v4l2_colorspace)
> + */
> +struct v4l2_mbus_framefmt {
> + __u32 width;
> + __u32 height;
> + __u32 code;
> + __u32 field;
> + __u32 colorspace;
> + __u32 reserved[7];
> +};
> +
> +#ifndef __KERNEL__
> +/*
> + * enum v4l2_mbus_pixelcode and its definitions are now deprecated, and
> + * MEDIA_BUS_FMT_ definitions (defined in media-bus-format.h) should be
> + * used instead.
> + *
> + * New defines should only be added to media-bus-format.h. The
> + * v4l2_mbus_pixelcode enum is frozen.
> + */
> +
> #define V4L2_MBUS_FROM_MEDIA_BUS_FMT(name) \
> MEDIA_BUS_FMT_ ## name = V4L2_MBUS_FMT_ ## name
Shouldn't this be the other way around?
V4L2_MBUS_FMT_ ## name = MEDIA_BUS_FMT_ ## name
Regards,
Hans
>
> @@ -102,22 +129,6 @@ enum v4l2_mbus_pixelcode {
>
> V4L2_MBUS_FROM_MEDIA_BUS_FMT(AHSV8888_1X32),
> };
> -
> -/**
> - * struct v4l2_mbus_framefmt - frame format on the media bus
> - * @width: frame width
> - * @height: frame height
> - * @code: data format code (from enum v4l2_mbus_pixelcode)
> - * @field: used interlacing type (from enum v4l2_field)
> - * @colorspace: colorspace of the data (from enum v4l2_colorspace)
> - */
> -struct v4l2_mbus_framefmt {
> - __u32 width;
> - __u32 height;
> - __u32 code;
> - __u32 field;
> - __u32 colorspace;
> - __u32 reserved[7];
> -};
> +#endif /* __KERNEL__ */
>
> #endif
>
WARNING: multiple messages have this Message-ID (diff)
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
Mauro Carvalho Chehab <m.chehab@samsung.com>,
Hans Verkuil <hans.verkuil@cisco.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org, Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-arm-kernel@lists.infradead.org, linux-api@vger.kernel.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: [PATCH v5 10/10] [media] v4l: Forbid usage of V4L2_MBUS_FMT definitions inside the kernel
Date: Mon, 10 Nov 2014 12:09:19 +0100 [thread overview]
Message-ID: <54609CDF.8030303@xs4all.nl> (raw)
In-Reply-To: <1415461632-31236-1-git-send-email-boris.brezillon@free-electrons.com>
On 11/08/2014 04:47 PM, Boris Brezillon wrote:
> Place v4l2_mbus_pixelcode in a #ifndef __KERNEL__ section so that kernel
> users don't have access to these definitions.
>
> We have to keep this definition for user-space users even though they're
> encouraged to move to the new media_bus_format enum.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> include/uapi/linux/v4l2-mediabus.h | 45 ++++++++++++++++++++++++--------------
> 1 file changed, 28 insertions(+), 17 deletions(-)
>
> diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h
> index d712df8..5c9410d 100644
> --- a/include/uapi/linux/v4l2-mediabus.h
> +++ b/include/uapi/linux/v4l2-mediabus.h
> @@ -15,6 +15,33 @@
> #include <linux/types.h>
> #include <linux/videodev2.h>
>
> +/**
> + * struct v4l2_mbus_framefmt - frame format on the media bus
> + * @width: frame width
> + * @height: frame height
> + * @code: data format code (from enum v4l2_mbus_pixelcode)
> + * @field: used interlacing type (from enum v4l2_field)
> + * @colorspace: colorspace of the data (from enum v4l2_colorspace)
> + */
> +struct v4l2_mbus_framefmt {
> + __u32 width;
> + __u32 height;
> + __u32 code;
> + __u32 field;
> + __u32 colorspace;
> + __u32 reserved[7];
> +};
> +
> +#ifndef __KERNEL__
> +/*
> + * enum v4l2_mbus_pixelcode and its definitions are now deprecated, and
> + * MEDIA_BUS_FMT_ definitions (defined in media-bus-format.h) should be
> + * used instead.
> + *
> + * New defines should only be added to media-bus-format.h. The
> + * v4l2_mbus_pixelcode enum is frozen.
> + */
> +
> #define V4L2_MBUS_FROM_MEDIA_BUS_FMT(name) \
> MEDIA_BUS_FMT_ ## name = V4L2_MBUS_FMT_ ## name
Shouldn't this be the other way around?
V4L2_MBUS_FMT_ ## name = MEDIA_BUS_FMT_ ## name
Regards,
Hans
>
> @@ -102,22 +129,6 @@ enum v4l2_mbus_pixelcode {
>
> V4L2_MBUS_FROM_MEDIA_BUS_FMT(AHSV8888_1X32),
> };
> -
> -/**
> - * struct v4l2_mbus_framefmt - frame format on the media bus
> - * @width: frame width
> - * @height: frame height
> - * @code: data format code (from enum v4l2_mbus_pixelcode)
> - * @field: used interlacing type (from enum v4l2_field)
> - * @colorspace: colorspace of the data (from enum v4l2_colorspace)
> - */
> -struct v4l2_mbus_framefmt {
> - __u32 width;
> - __u32 height;
> - __u32 code;
> - __u32 field;
> - __u32 colorspace;
> - __u32 reserved[7];
> -};
> +#endif /* __KERNEL__ */
>
> #endif
>
next prev parent reply other threads:[~2014-11-10 11:09 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 14:07 [PATCH v3 00/10] [media] Make mediabus format subsystem neutral Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` [PATCH v3 01/10] [media] Move mediabus format definition to a more standard place Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 15:24 ` Sakari Ailus
2014-11-07 15:24 ` Sakari Ailus
[not found] ` <20141107152416.GC3136-S+BSfZ9RZZmRSg0ZkenSGLdO1Tsj/99ntUK59QYPAWc@public.gmane.org>
2014-11-07 16:09 ` Boris Brezillon
2014-11-07 16:09 ` Boris Brezillon
2014-11-07 16:09 ` Boris Brezillon
2014-11-07 16:28 ` [PATCH v4 " Boris Brezillon
2014-11-07 16:28 ` Boris Brezillon
2014-11-07 16:28 ` Boris Brezillon
2014-11-07 14:07 ` [PATCH v3 02/10] [media] v4l: Update subdev-formats doc with new MEDIA_BUS_FMT values Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` [PATCH v3 03/10] [media] Make use of the new media_bus_format definitions Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` [PATCH v3 04/10] [media] i2c: Make use of media_bus_format enum Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
[not found] ` <1415369269-5064-5-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-11-08 9:23 ` Prabhakar Lad
2014-11-08 9:23 ` Prabhakar Lad
2014-11-07 14:07 ` [PATCH v3 05/10] [media] pci: Make use of MEDIA_BUS_FMT definitions Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` [PATCH v3 06/10] [media] platform: Make use of media_bus_format enum Boris Brezillon
2014-11-08 9:18 ` Prabhakar Lad
2014-11-08 9:18 ` Prabhakar Lad
2014-11-11 4:42 ` Sekhar Nori
2014-11-11 4:42 ` Sekhar Nori
2014-11-11 7:49 ` Sekhar Nori
2014-11-11 7:49 ` Sekhar Nori
[not found] ` <1415369269-5064-1-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-11-07 14:07 ` [PATCH v3 07/10] [media] usb: " Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:51 ` [PATCH v3 00/10] [media] Make mediabus format subsystem neutral Hans Verkuil
2014-11-07 14:51 ` Hans Verkuil
2014-11-07 14:51 ` Hans Verkuil
2014-11-08 15:47 ` [PATCH v5 10/10] [media] v4l: Forbid usage of V4L2_MBUS_FMT definitions inside the kernel Boris Brezillon
2014-11-08 15:47 ` Boris Brezillon
2014-11-08 15:47 ` Boris Brezillon
2014-11-10 11:09 ` Hans Verkuil [this message]
2014-11-10 11:09 ` Hans Verkuil
2014-11-10 11:09 ` Hans Verkuil
[not found] ` <54609CDF.8030303-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2014-11-10 17:02 ` Boris Brezillon
2014-11-10 17:02 ` Boris Brezillon
2014-11-10 17:02 ` Boris Brezillon
2014-11-07 14:07 ` [PATCH v3 08/10] staging: media: Make use of MEDIA_BUS_FMT_ definitions Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-08 9:11 ` Prabhakar Lad
2014-11-08 9:11 ` Prabhakar Lad
2014-11-08 9:11 ` Prabhakar Lad
2014-11-07 14:07 ` [PATCH v3 09/10] gpu: ipu-v3: Make use of media_bus_format enum Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 15:05 ` Philipp Zabel
2014-11-07 15:05 ` Philipp Zabel
2014-11-07 14:07 ` [PATCH v3 10/10] [media] v4l: Forbid usage of V4L2_MBUS_FMT definitions inside the kernel Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:07 ` Boris Brezillon
2014-11-07 14:47 ` Hans Verkuil
2014-11-07 14:47 ` Hans Verkuil
2014-11-07 14:47 ` Hans Verkuil
[not found] ` <545CDB8D.4080406-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2014-11-07 15:31 ` Boris Brezillon
2014-11-07 15:31 ` Boris Brezillon
2014-11-07 15:31 ` Boris Brezillon
2014-11-07 16:27 ` [PATCH v4 " Boris Brezillon
2014-11-07 16:27 ` Boris Brezillon
2014-11-07 16:27 ` Boris Brezillon
2014-11-07 22:47 ` Sakari Ailus
2014-11-07 22:47 ` Sakari Ailus
[not found] ` <545D4BFD.6000206-X3B1VOXEql0@public.gmane.org>
2014-11-08 0:38 ` Boris Brezillon
2014-11-08 0:38 ` Boris Brezillon
2014-11-08 0:38 ` Boris Brezillon
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=54609CDF.8030303@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=boris.brezillon@free-electrons.com \
--cc=devel@driverdev.osuosl.org \
--cc=g.liakhovetski@gmx.de \
--cc=hans.verkuil@cisco.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=sakari.ailus@iki.fi \
/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.