Re: [PATCH 1/1] Rename camel case variables in channel.c (updated again)

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

 



On Fri, 2010-09-24 at 16:06 +0000, Haiyang Zhang wrote:
> From: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> -		set_bit(Channel->MonitorBit,
> -			(unsigned long *)&monitorPage->TriggerGroup
> -					[Channel->MonitorGroup].Pending);
> +		set_bit(channel->MonitorBit,
> +			(unsigned long *)&monitorpage->TriggerGroup
> +					[channel->MonitorGroup].Pending);

Unrelated to the camelcase conversion, this casting of
a (u32 *) to an (unsigned long *) to set a bit seems
like a bad idea and an error waiting to happen.

Does it really need to be atomic?

Perhaps it'd be better to write something like:

	monitorpage->TriggerGroup[channel->MonitorGroup].Pending |=
		(1 << channel->MonitorBit);

Maybe like the other 2 uses of set_bit in hv, it
should be set_bit(channel->MonitorBit & 31, ...


_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux