From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAAKr-0007rl-HF for qemu-devel@nongnu.org; Sun, 22 Apr 2018 04:27:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAAKm-0003D8-HI for qemu-devel@nongnu.org; Sun, 22 Apr 2018 04:27:01 -0400 References: <20180420123456.22196-1-david@redhat.com> <20180420123456.22196-2-david@redhat.com> <1768047882.21650876.1524373778096.JavaMail.zimbra@redhat.com> From: David Hildenbrand Message-ID: <9588e61b-e9d0-c320-d6f8-790b245a1dc8@redhat.com> Date: Sun, 22 Apr 2018 10:26:44 +0200 MIME-Version: 1.0 In-Reply-To: <1768047882.21650876.1524373778096.JavaMail.zimbra@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 1/3] pc-dimm: factor out MemoryDevice interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pankaj Gupta Cc: qemu-devel@nongnu.org, Eduardo Habkost , "Michael S . Tsirkin" , Markus Armbruster , qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Igor Mammedov , David Gibson , Richard Henderson >> +typedef struct MemoryDeviceClass { >> + InterfaceClass parent_class; >> + >> + uint64_t (*get_addr)(MemoryDeviceState *md); >> + uint64_t (*get_plugged_size)(MemoryDeviceState *md, Error **errp)= ; >> + uint64_t (*get_region_size)(MemoryDeviceState *md, Error **errp); >=20 > Just not sure if we need second argument 'Error **errp'? Or all functio= ns > declarations should have this?=20 We need them right now due to the existing implementation of PCDIMM. I don't think we will ever hit such a case (not if anything else is seriously wrong). If nobody has a problem with it, I'll drop these two parameters and directly use &error_abort internally (PCDIMM). Adding Error **errp to functions where we don't expect to be errors doesn't feel right. Thanks for pointing this out! --=20 Thanks, David / dhildenb