From: Hans Verkuil <hansverk@cisco.com>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: LMML <linux-media@vger.kernel.org>,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH] v4l2-compliance: fix function pointer prototype
Date: Tue, 01 Apr 2014 15:50:45 +0200 [thread overview]
Message-ID: <533AC435.8040604@cisco.com> (raw)
In-Reply-To: <1396359906-6311-1-git-send-email-prabhakar.csengg@gmail.com>
Hi Prabhakar,
On 04/01/14 15:45, Lad, Prabhakar wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> There was a conflict between the mmap function pointer prototype of
> struct v4l_fd and the actual function used. Make sure it is in sync
> with the prototype of v4l2_mmap.
The prototype of v4l2_mmap uses int64_t, so I don't understand this
patch.
Regards,
Hans
>
> This patch fixes following build error,
>
> v4l2-compliance.cpp: In function 'void v4l_fd_test_init(v4l_fd*, int)':
> v4l2-compliance.cpp:132: error: invalid conversion from
> 'void* (*)(void*, size_t, int, int, int, int64_t)' to
> 'void* (*)(void*, size_t, int, int, int, off_t)'
>
> Cc: Hans Verkuil <hans.verkuil@cisco.com>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> ---
> utils/v4l2-compliance/v4l-helpers.h | 2 +-
> utils/v4l2-compliance/v4l2-compliance.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/utils/v4l2-compliance/v4l-helpers.h b/utils/v4l2-compliance/v4l-helpers.h
> index 48ea602..b2ce6c0 100644
> --- a/utils/v4l2-compliance/v4l-helpers.h
> +++ b/utils/v4l2-compliance/v4l-helpers.h
> @@ -10,7 +10,7 @@ struct v4l_fd {
> int fd;
> int (*ioctl)(int fd, unsigned long cmd, ...);
> void *(*mmap)(void *addr, size_t length, int prot, int flags,
> - int fd, int64_t offset);
> + int fd, off_t offset);
> int (*munmap)(void *addr, size_t length);
> };
>
> diff --git a/utils/v4l2-compliance/v4l2-compliance.h b/utils/v4l2-compliance/v4l2-compliance.h
> index f2f7072..b6d4dae 100644
> --- a/utils/v4l2-compliance/v4l2-compliance.h
> +++ b/utils/v4l2-compliance/v4l2-compliance.h
> @@ -137,7 +137,7 @@ static inline int test_ioctl(int fd, unsigned long cmd, ...)
> }
>
> static inline void *test_mmap(void *start, size_t length, int prot, int flags,
> - int fd, int64_t offset)
> + int fd, off_t offset)
> {
> return wrapper ? v4l2_mmap(start, length, prot, flags, fd, offset) :
> mmap(start, length, prot, flags, fd, offset);
>
next prev parent reply other threads:[~2014-04-01 13:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 13:45 [PATCH] v4l2-compliance: fix function pointer prototype Lad, Prabhakar
2014-04-01 13:50 ` Hans Verkuil [this message]
2014-04-01 14:06 ` Prabhakar Lad
2014-04-01 14:26 ` Hans Verkuil
2014-04-01 14:42 ` Hans Verkuil
2014-04-01 14:48 ` Prabhakar Lad
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=533AC435.8040604@cisco.com \
--to=hansverk@cisco.com \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.org \
--cc=prabhakar.csengg@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.