public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert William Fuller <hydrologiccycle@gmail.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: video4linux-list@redhat.com, LKML <linux-kernel@vger.kernel.org>,
	"Németh Márton" <nm127@freemail.hu>
Subject: Re: [PATCH 2/2] video: simplify cx18_get_input() and	ivtv_get_input()
Date: Mon, 13 Oct 2008 17:40:48 -0400	[thread overview]
Message-ID: <48F3C060.2050302@gmail.com> (raw)
In-Reply-To: <200810132328.47170.hverkuil@xs4all.nl>

Hans Verkuil wrote:
> On Monday 13 October 2008 22:54:06 Németh Márton wrote:
>> From: Márton Németh <nm127@freemail.hu>
>>
>> The cx18_get_input() and ivtv_get_input() are called
>> once from the VIDIOC_ENUMINPUT ioctl() and once from
>> the *_log_status() functions. In the first case the
>> struct v4l2_input is already filled with zeros,
>> so doing this again is unnecessary.
> 
> And in the second case no one cares whether the struct is zeroed. And 
> the same situation is also true for ivtv_get_output().

Yeah, 'cos there's nothing better than uninitialized fields, like the 
recent report of a control that returns minimum and maximum values of 
zero, but a step-size of 9.  Why are we optimizing code paths that are 
not performance critical by uninitializing memory?

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  reply	other threads:[~2008-10-13 21:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <48F3B56E.9050404@freemail.hu>
2008-10-13 21:28 ` [PATCH 2/2] video: simplify cx18_get_input() and ivtv_get_input() Hans Verkuil
2008-10-13 21:40   ` Robert William Fuller [this message]
2008-10-13 21:49     ` [PATCH 2/2] video: simplify cx18_get_input() and ivtv_get_input () Hans Verkuil

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=48F3C060.2050302@gmail.com \
    --to=hydrologiccycle@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm127@freemail.hu \
    --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