Re: [PATCH 2/2] video: simplify cx18_get_input() and ivtv_get_input()

From: Robert William Fuller
Date: Mon Oct 13 2008 - 17:41:30 EST


Hans Verkuil wrote:
On Monday 13 October 2008 22:54:06 NÃmeth MÃrton wrote:
From: MÃrton NÃmeth <nm127@xxxxxxxxxxx>

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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/