Messages in this thread | | | From | Hans Verkuil <> | Subject | Re: [PATCH 2/2] video: simplify cx18_get_input() and ivtv get input() | Date | Mon, 13 Oct 2008 23:49:06 +0200 |
| |
On Monday 13 October 2008 23:40:48 Robert William Fuller wrote: > 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?
It's already initialized to 0 in v4l2-ioctl.c. No need to do it twice.
Regards,
Hans -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |