Re: struct wait_queue_Head_t to struct swait_head warning

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

 



On Thu, 17 Mar 2016, Matt Campbell wrote:
> It looks like this is due 'struct completion' changing to using the
> simple waitqueue in the RT patch. When looking at the rest of the RT
> patch it looks like cases like this are handled by changing the API to
> use the simple wait calls for these (for example usb/gadget/f_fs.c). I
> was able to get rid of the warning by switching from
> 'waitqueue_active' to 'swaitqueue_active'. I'm not fully knowledge
> about the possible effects, so I was hoping someone could let me know
> if this is or isn't a good solution. I know this isn't mainline, but I
> would appreciate any help to point me in the right direction.

Yes, the conversion is correct. Though that driver code is complete and utter
crap.

	if (waitqueue_active(&_pno_state->get_batch_done.wait))
		complete(&_pno_state->get_batch_done);

There is no point having this if () clause. Either the code completes or it
does not, but making it dependent whether there are waiters on the completion,
does not make any sense. And looking at the other instance where they fiddle
with the inner waitqueue of the completion, that makes no sense either. It's
just racy as hell. Oh well, why do I care?

Thanks,

	tglx




--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux