ivtv-ioctl.c: possible problem with IVTV_F_I_DMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The file drivers/media/video/ivtv/ivtv-ioctl.c contains the following code:

(starting at line 183 in a recent linux-next)

		while (itv->i_flags & IVTV_F_I_DMA) {
			got_sig = signal_pending(current);
			if (got_sig)
				break;
			got_sig = 0;
			schedule();
		}

The only possible value of IVTV_F_I_DMA, however, seems to be 0, as defined
in drivers/media/video/ivtv/ivtv-driver.h, and thus the test is never true.
Is this what is intended, or should the test be expressed in another way?

julia

This problem was found using the following semantic match:
(http://www.emn.fr/x-info/coccinelle/)

@r expression@
identifier C;
expression E;
position p;
@@

(
 E & C@p && ...
|
 E & C@p || ...
)

@s@
identifier r.C;
position p1;
@@

#define C 0

@t@
identifier r.C;
expression E != 0;
@@

#define C E

@script:python depends on s && !t@
p << r.p;
C << r.C;
@@

cocci.print_main("and with 0", p)
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux