From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MPJfP-0003ba-Go for qemu-devel@nongnu.org; Fri, 10 Jul 2009 13:13:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MPJfL-0003Xq-5G for qemu-devel@nongnu.org; Fri, 10 Jul 2009 13:13:47 -0400 Received: from [199.232.76.173] (port=49678 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPJfK-0003XW-Mm for qemu-devel@nongnu.org; Fri, 10 Jul 2009 13:13:42 -0400 Received: from mx20.gnu.org ([199.232.41.8]:37162) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MPJfK-00035a-C8 for qemu-devel@nongnu.org; Fri, 10 Jul 2009 13:13:42 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MPJfI-0003y2-IJ for qemu-devel@nongnu.org; Fri, 10 Jul 2009 13:13:40 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 01/13] qdev: rework device properties. Date: Fri, 10 Jul 2009 18:13:36 +0100 References: <1247225179-5495-1-git-send-email-kraxel@redhat.com> <1247225179-5495-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1247225179-5495-2-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907101813.37430.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann >+extern PropertyInfo qdev_prop_uint32; >+extern PropertyInfo qdev_prop_hex32; Having both of these seems wrong. >+ .name = "fifo-size", >+ .info = &qdev_prop_uint32, >+ .offset = offsetof(SyborgPointerState, fifo_size), >+ .defval = (uint32_t[]) { 16 }, This feels kinda crufty. Very easy to get the wrong types. There's also no typechecking in qdev_set_prop*. >+int qdev_prop_set_uint32(DeviceState *dev, const char *name, uint32_t > value); Why does this return a value? Paul