kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: peter.senna@gmail.com (Peter Senna Tschudin)
To: kernelnewbies@lists.kernelnewbies.org
Subject: [QUESTION] staging/easycap fix
Date: Wed, 15 Feb 2012 12:14:38 -0200	[thread overview]
Message-ID: <CA+MoWDqXAK0W4Tfu+VhqMVbtwu_Fs=4qF8mA=YonN0sMAK+Cmw@mail.gmail.com> (raw)
In-Reply-To: <20120214223914.GB21350@kroah.com>

Ezequiel,

The post: Intro to V4L2:
http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/Intro-to-V4L2/

And the post: The VIVI driver; a great starting point for V4L2 driver writers:
http://lwn.net/Articles/203971/

May be useful.

[]'s

Peter


2012/2/14 Greg KH <greg@kroah.com>:
> On Tue, Feb 14, 2012 at 07:01:25PM -0300, Ezequiel Garc?a wrote:
>> Hi Greg,
>>
>> >
>> > It's only "recommended" if you have a compiler that doesn't check for
>> > such foolish things.
>> >
>>
>> Understood. Thanks both.
>>
>> Another question (hope you don't mind me asking so much):
>>
>> I noticed easycap does lots of (redundant?) checks as:
>>
>> pvideo_device = video_devdata(file);
>> if (!pvideo_device) {
>> ? return -EFAULT;
>> }
>>
>> Is this bad, good or doesn't matter?
>> (There are more examples where the check is clearly not needed but
>> this one makes me doubt a bit)
>
> Depends on what video_devdata() does, and how it could ever be NULL.
>
>> Maybe I'm focusing on small issues (as you already pointed out),
>> do you think this kind of patches would be accepted?
>>
>> Of course, I would submit separate patches, one for each change:
>> 1. split probe function
>> 2. remove redundant checks
>> 3. clean comment style
>> ... and so on.
>
> That sounds great.
>
>> Also, I'm reading driver cx231xx as it's also an usb video capture.
>> Do you think it's a good code reference? Can you give me further reference?
>
> I don't know, ask the linux-media developers on their list for a good
> reference driver to follow, they would know best.
>
> thanks,
>
> greg k-h
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
Peter Senna Tschudin
peter.senna at gmail.com
gpg id: 48274C36

  reply	other threads:[~2012-02-15 14:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CALF0-+UdbqOnQ6ZT0bPiMVCTFWwMQss6XrFqNL6xsugRPVX_qw@mail.gmail.com>
2012-02-14  4:47 ` [QUESTION] staging/easycap fix Ezequiel García
2012-02-14  5:06   ` Greg KH
2012-02-14  5:30     ` Ezequiel García
2012-02-14  5:59       ` Manavendra Nath Manav
2012-02-14  6:26         ` Greg KH
2012-02-14 22:01           ` Ezequiel García
2012-02-14 22:39             ` Greg KH
2012-02-15 14:14               ` Peter Senna Tschudin [this message]
2012-02-16 12:57                 ` Ezequiel García

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='CA+MoWDqXAK0W4Tfu+VhqMVbtwu_Fs=4qF8mA=YonN0sMAK+Cmw@mail.gmail.com' \
    --to=peter.senna@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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;
as well as URLs for NNTP newsgroup(s).