|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [PATCH V8 09/18] pc: remove a global variable, RTCState *rtc_state. |
Date: | Mon, 07 Dec 2009 10:15:17 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Lightning/1.0pre Thunderbird/3.0b4 |
On 12/04/09 06:50, Isaku Yamahata wrote:
remove a global variable, RTCState *rtc_state. Only the cmos_set_s3_resume_init() needs it global. So introduce a registering function and make it local. As for other function which references the variable, pass it as a function argument. Signed-off-by: Isaku Yamahata<address@hidden> Cc: Paolo Bonzini<address@hidden>
--- a/hw/pc.c +++ b/hw/pc.c @@ -64,8 +64,6 @@
[ ... ]
-static RTCState *rtc_state;
[ ... ]
+static RTCState *rtc_state;
[ ... ] Hmm? Patch description says something else ...With my qdev hat on: If you cleanup that anyway I'd suggest to make the rtc_* functions accept and return DeviceState instead of RTCState, so the pc.c code just has a "this is the rtc device" kind of reference.
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |