[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1285349388.11616.117.camel@Joe-Laptop>
Date: Fri, 24 Sep 2010 10:29:48 -0700
From: Joe Perches <joe@...ches.com>
To: Haiyang Zhang <haiyangz@...rosoft.com>
Cc: "'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
"'devel@...verdev.osuosl.org'" <devel@...verdev.osuosl.org>,
"'virtualization@...ts.osdl.org'" <virtualization@...ts.osdl.org>,
"'gregkh@...e.de'" <gregkh@...e.de>
Subject: Re: [PATCH 1/1] Rename camel case variables in channel.c (updated
again)
On Fri, 2010-09-24 at 16:06 +0000, Haiyang Zhang wrote:
> From: Haiyang Zhang <haiyangz@...rosoft.com>
> - 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, ...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists