From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O25po-0002sd-NZ for qemu-devel@nongnu.org; Wed, 14 Apr 2010 12:53:04 -0400 Received: from [140.186.70.92] (port=53578 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O25pn-0002ql-57 for qemu-devel@nongnu.org; Wed, 14 Apr 2010 12:53:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O25pl-0008QS-MW for qemu-devel@nongnu.org; Wed, 14 Apr 2010 12:53:03 -0400 Received: from mail-pz0-f204.google.com ([209.85.222.204]:40648) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O25pl-0008QI-FX for qemu-devel@nongnu.org; Wed, 14 Apr 2010 12:53:01 -0400 Received: by pzk42 with SMTP id 42so299144pzk.4 for ; Wed, 14 Apr 2010 09:53:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1271238922-10008-9-git-send-email-kraxel@redhat.com> References: <1271238922-10008-1-git-send-email-kraxel@redhat.com> <1271238922-10008-9-git-send-email-kraxel@redhat.com> Date: Wed, 14 Apr 2010 19:52:57 +0300 Message-ID: Subject: Re: [Qemu-devel] [RfC PATCH 08/11] spice: add qxl device From: Blue Swirl Content-Type: text/plain; charset=UTF-8 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On 4/14/10, Gerd Hoffmann wrote: > +static inline void atomic_or(uint32_t *var, uint32_t add) > +{ > + __asm__ __volatile__ ("lock; orl %1, %0" : "+m" (*var) : "r" (add) : "memory"); > +} This will break on non-x86 hosts. > +static QXLInterface qxl_interface = { > + .base.type = SPICE_INTERFACE_QXL, > + .base.description = "qxl gpu", > + .base.major_version = SPICE_INTERFACE_QXL_MAJOR, > + .base.minor_version = SPICE_INTERFACE_QXL_MINOR, > + > + .pci_vendor = REDHAT_PCI_VENDOR_ID, > + .pci_id = QXL_DEVICE_ID, > + .pci_revision = QXL_REVISION, > + > + .attache_worker = interface_attach_worker, > + .set_compression_level = interface_set_compression_level, > + .set_mm_time = interface_set_mm_time, > + > + .get_init_info = interface_get_init_info, > + .get_command = interface_get_command, > + .req_cmd_notification = interface_req_cmd_notification, > + .has_command = interface_has_command, > + .release_resource = interface_release_resource, > + .get_cursor_command = interface_get_cursor_command, > + .req_cursor_notification = interface_req_cursor_notification, > + .get_update_area = interface_get_update_area, > + .notify_update = interface_notify_update, > + .set_save_data = interface_set_save_data, > + .get_save_data = interface_get_save_data, > + .flush_resources = interface_flush_resources, > +}; Could this (and other similar cases) be const?