* [PATCH] media: v4l2-subdev: Don't use __u32 internally
@ 2019-10-18 15:31 Janusz Krzysztofik
2019-10-18 17:30 ` Sakari Ailus
0 siblings, 1 reply; 2+ messages in thread
From: Janusz Krzysztofik @ 2019-10-18 15:31 UTC (permalink / raw)
To: Sakari Ailus
Cc: Mauro Carvalho Chehab, Hans Verkuil, linux-media, Janusz Krzysztofik
Commit a8fa55078a77 ("media: v4l2-subdev: Verify arguments in
v4l2_subdev_call()") and commit 374d62e7aa50 ("media: v4l2-subdev:
Verify v4l2_subdev_call() pad config argument") introduced a few local
functions, unfortunately with arguments of type __u32, reserved for use
in Linux uAPI. Use u32 instead.
Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
---
drivers/media/v4l2-core/v4l2-subdev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index f725cd9b66b9..9e987c0f840e 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -112,7 +112,7 @@ static int subdev_close(struct file *file)
return 0;
}
-static inline int check_which(__u32 which)
+static inline int check_which(u32 which)
{
if (which != V4L2_SUBDEV_FORMAT_TRY &&
which != V4L2_SUBDEV_FORMAT_ACTIVE)
@@ -121,7 +121,7 @@ static inline int check_which(__u32 which)
return 0;
}
-static inline int check_pad(struct v4l2_subdev *sd, __u32 pad)
+static inline int check_pad(struct v4l2_subdev *sd, u32 pad)
{
#if defined(CONFIG_MEDIA_CONTROLLER)
if (sd->entity.num_pads) {
@@ -136,7 +136,7 @@ static inline int check_pad(struct v4l2_subdev *sd, __u32 pad)
return 0;
}
-static int check_cfg(__u32 which, struct v4l2_subdev_pad_config *cfg)
+static int check_cfg(u32 which, struct v4l2_subdev_pad_config *cfg)
{
if (which == V4L2_SUBDEV_FORMAT_TRY && !cfg)
return -EINVAL;
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: v4l2-subdev: Don't use __u32 internally
2019-10-18 15:31 [PATCH] media: v4l2-subdev: Don't use __u32 internally Janusz Krzysztofik
@ 2019-10-18 17:30 ` Sakari Ailus
0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2019-10-18 17:30 UTC (permalink / raw)
To: Janusz Krzysztofik; +Cc: Mauro Carvalho Chehab, Hans Verkuil, linux-media
On Fri, Oct 18, 2019 at 05:31:40PM +0200, Janusz Krzysztofik wrote:
> Commit a8fa55078a77 ("media: v4l2-subdev: Verify arguments in
> v4l2_subdev_call()") and commit 374d62e7aa50 ("media: v4l2-subdev:
> Verify v4l2_subdev_call() pad config argument") introduced a few local
> functions, unfortunately with arguments of type __u32, reserved for use
> in Linux uAPI. Use u32 instead.
>
> Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Thanks!
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
--
Sakari Ailus
sakari.ailus@linux.intel.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-18 17:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 15:31 [PATCH] media: v4l2-subdev: Don't use __u32 internally Janusz Krzysztofik
2019-10-18 17:30 ` Sakari Ailus
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).