linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* __video_register_device: warning cannot be reached if warn_if_nr_in_use
@ 2012-08-09 12:55 Richard Zhao
  2012-08-09 13:19 ` Hans Verkuil
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Zhao @ 2012-08-09 12:55 UTC (permalink / raw)
  To: linux-media

In file drivers/media/video/v4l2-dev.c

int __video_register_device(struct video_device *vdev, int type, int nr,
		int warn_if_nr_in_use, struct module *owner)
{
[...]
	vdev->minor = i + minor_offset;
878:	vdev->num = nr;

vdev->num is set to nr here. 
[...]
	if (nr != -1 && nr != vdev->num && warn_if_nr_in_use)
		printk(KERN_WARNING "%s: requested %s%d, got %s\n", __func__,
			name_base, nr, video_device_node_name(vdev));

so nr != vdev->num is always false. The warning can never be printed.

Thanks
Richard


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-09 13:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-09 12:55 __video_register_device: warning cannot be reached if warn_if_nr_in_use Richard Zhao
2012-08-09 13:19 ` Hans Verkuil
2012-08-09 13:40   ` Richard Zhao
2012-08-09 13:52   ` Sylwester Nawrocki

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).