public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Bligh <mbligh@google.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>, Sujoy Gupta <sujoy@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	video4linux-list@redhat.com
Subject: Re: [PATCH] fix compiler warning in drivers/media/video/video-buf.c
Date: Fri, 29 Sep 2006 12:59:29 -0700	[thread overview]
Message-ID: <451D7B21.4050105@google.com> (raw)
In-Reply-To: <1159559648.10055.35.camel@praia>

Mauro Carvalho Chehab wrote:
> Em Qui, 2006-09-28 às 10:51 -0700, Andrew Morton escreveu:
> 
>>On Thu, 28 Sep 2006 10:31:58 -0700
>>Martin Bligh <mbligh@google.com> wrote:
> 
> 
>>That being said, this driver is wrong to be storing dma addresses in a
>>void*.  And indeed there is a FIXME regarding this at
>>include/linux/videodev2.h:476, so I guess hiding this warning won't obscure
>>any fault which wasn't already known about..
> 
> 
> Yes. The original structure is:
> 
> struct v4l2_framebuffer
> {
>         __u32                   capability;
>         __u32                   flags;
>         void*                   base;
>         struct v4l2_pix_format  fmt;
> };
> 
> Since this is used at ioctl definition, changing this would break
> userspace apps. We might replace this to something like:
> 
> struct v4l2_framebuffer
> {
>         __u32                   capability;
>         __u32                   flags;
> 	union {
> 	        void*		base_ptr; /*FOO definition to avoid breaking userpace apps */
> 		dma_addr_t	base;
> 	}
>         struct v4l2_pix_format  fmt;
> };
> 
> This way, base will have the expected type, and it won't break any
> userspace app if sizeof(void *)<=sizeof(base). I think this is true for
> all architectures (anyway, if it isn't, v4l is broken anyway).

Won't that just make the userspace apps not work properly? Not that
they do right now, but how does masking the problem help?

M.

      reply	other threads:[~2006-09-29 20:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-28 17:31 [PATCH] fix compiler warning in drivers/media/video/video-buf.c Martin Bligh
2006-09-28 17:37 ` Nish Aravamudan
2006-09-28 17:51 ` Andrew Morton
2006-09-29 19:54   ` Mauro Carvalho Chehab
2006-09-29 19:59     ` Martin Bligh [this message]

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=451D7B21.4050105@google.com \
    --to=mbligh@google.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=sujoy@google.com \
    --cc=video4linux-list@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox