From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2KGh-0005RW-BH for qemu-devel@nongnu.org; Thu, 25 Jul 2013 08:03:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2KGe-0007gy-KY for qemu-devel@nongnu.org; Thu, 25 Jul 2013 08:03:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2KGe-0007gl-DU for qemu-devel@nongnu.org; Thu, 25 Jul 2013 08:03:36 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6PC3Zbq023386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Jul 2013 08:03:35 -0400 Message-ID: <51F11415.6090906@redhat.com> Date: Thu, 25 Jul 2013 14:03:33 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1374681580-17439-1-git-send-email-mst@redhat.com> <1374681580-17439-13-git-send-email-mst@redhat.com> <51F0FE20.7050302@redhat.com> <20130725105526.GA28819@redhat.com> <51F10668.5020100@redhat.com> <20130725112247.GA28893@redhat.com> In-Reply-To: <20130725112247.GA28893@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On 07/25/13 13:22, Michael S. Tsirkin wrote: > On Thu, Jul 25, 2013 at 01:05:12PM +0200, Gerd Hoffmann wrote: >> Hi, >> >>> I can change the implementation but I don't think it's >>> a good idea to copy property names around: >>> it's too fragile, compiler won't warn us if we >>> change the name or value semantics, >> >> I'm not worried. Changing the strings will break the command line >> interface too (qemu -device pvpanic,ioport=...), so that isn't going to >> happen. >> >> cheers, >> Gerd > > What will catch this breakage? > There are 0 users actually tweaking the port > number so I'm sure no one will notice this. > > In any case, catching errors at compile time > is much better than at runtime. > > What exactly are advantages of duplicating > property names in this way? I don't see any. You don't need access to pvpanic internals then and thus the code can be moved over to the acpi generator. At least in this case where all info needed is already available via properties. cheers, Gerd