From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MORpd-0005J0-7A for qemu-devel@nongnu.org; Wed, 08 Jul 2009 03:44:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MORpY-0005Im-3Q for qemu-devel@nongnu.org; Wed, 08 Jul 2009 03:44:44 -0400 Received: from [199.232.76.173] (port=59094 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MORpX-0005Ij-TN for qemu-devel@nongnu.org; Wed, 08 Jul 2009 03:44:39 -0400 Received: from mx20.gnu.org ([199.232.41.8]:53917) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MORpX-00011j-AP for qemu-devel@nongnu.org; Wed, 08 Jul 2009 03:44:39 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MORpW-0000q2-29 for qemu-devel@nongnu.org; Wed, 08 Jul 2009 03:44:38 -0400 Received: by bwz5 with SMTP id 5so1401269bwz.34 for ; Wed, 08 Jul 2009 00:44:35 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4A544E5F.2050700@gnu.org> Date: Wed, 08 Jul 2009 09:44:31 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1246605098-24411-1-git-send-email-yamahata@valinux.co.jp> <1246605098-24411-10-git-send-email-yamahata@valinux.co.jp> In-Reply-To: <1246605098-24411-10-git-send-email-yamahata@valinux.co.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 09/17] pc.c: remove a global variable, RTCState *rtc_state. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org On 07/03/2009 09:11 AM, Isaku Yamahata wrote: > +#if defined(TARGET_I386) > /* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE) > BIOS will read it and start S3 resume at POST Entry */ > +static RTCState *rtc_state; > +void cmos_set_s3_resume_init(RTCState *s) > +{ > + rtc_state = s; > +} > + > void cmos_set_s3_resume(void) > { > if (rtc_state) > rtc_set_memory(rtc_state, 0xF, 0xFE); > } > +#endif Comment above the wrong function. Also, rather than defining it only for TARGET_I386, I would #ifdef just the body if cmos_set_s3_resume for cleanliness. Paolo