From patchwork Tue Nov 5 14:42:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 11227997 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2BF8E1747 for ; Tue, 5 Nov 2019 14:44:40 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11FFD21928 for ; Tue, 5 Nov 2019 14:44:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11FFD21928 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iS037-0002Q1-Po; Tue, 05 Nov 2019 14:43:13 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iS036-0002Pn-CP for xen-devel@lists.xenproject.org; Tue, 05 Nov 2019 14:43:12 +0000 X-Inumbo-ID: 96d6700c-ffda-11e9-a19a-12813bfff9fa Received: from mout.kundenserver.de (unknown [212.227.126.135]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 96d6700c-ffda-11e9-a19a-12813bfff9fa; Tue, 05 Nov 2019 14:43:11 +0000 (UTC) Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MNOZO-1iHcpa0A94-00OnFO; Tue, 05 Nov 2019 15:43:00 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Tue, 5 Nov 2019 15:42:46 +0100 Message-Id: <20191105144247.10301-4-laurent@vivier.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191105144247.10301-1-laurent@vivier.eu> References: <20191105144247.10301-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:6lLJMzjHAvmf+zbwEIjFaYmgyD4Xp9wj/yXBg2phAoLtjGTLNyf jFjRccWeRNCD3ubmrfEp6pKPVm7zFgjB+CKCqYNlLfEM0oSrYgQF1m5aP+VPUibYsU/asll l0BTqu8MMLy2rC5IlFC/P74gFDbdiPqYjDS81gLzgE669CpGIkKZX6QpwL+i+h9nd3ihAHs k0aU8H/oBeIugwumgO8KA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:9IzBdaTOrfc=:WVe7Hft7P5ufdiP75OVziB x8KctqAt8Cv13LcM75gj++4dutEn1v6LhQCSchEOYg+3tcCUGhIt50OpmFgITwSRxocBrT6e1 bLP2HAWKwgcU66M482GnlsGwKAOwQSJubLVIpHxdSfMoOFUbTgySaV4aNsT8/NXQ44Ekpb6dj fkHmWUkptVIFOgHWCV8k7MOqOuGhzS4yhquR6JINooEiJtgAdBX7i7cYnis4JxR90Rq7mGqcm r8TB5sXsaFdr2oMLgWl23Fv+1rChP4I+6k371AwGaZIom+FcxtKUVlK9SnhPQErgGNMr0eaKv exQ23WnT7L0Q80b1ybigTikE0TmleJRNc/kVNs/6G0L9AQ6yIZpFpWoDb8rBApCbyt4ShbJPU ANLd4+KPQn2ALCD9oXPCD7JYQEAmtSclO/2X9fYeMaRedVAseex7WifatctvkBWGZ1NbpXfpD VJAmA+VGKVzMy1hC7r8S19oX6SnbiFpS6KrzdL+UBRPD6cYUfU1TMWr53tI+RSeydqA6CF7d+ cI0ZBSSQ+ydwV0IgBhHd90uy2gMyoxuwEn2wacAXtC6zUy/R8Hdu1de7EpV6skhW6Dzb+TXyq nHnuwiwgIrNcSkeEn44cN7ThC6TWlXbVEo2lK+e/FtwcX2dLjRb9+7BAMOFpVcc1jnv03IeI6 Y2l5mm0yZ489zSr+dbjUHxYaHF2spJzvD7vxmkeDD3V//U+togeiqoOm5AXdQJAcBcH1zAy3D b6tewJkju/xecXIYUa9kGmGwLWBWI1IMTK2wQ6W8+NQpz2/P78nHKQuxG6cQwqQI/rPdhAViP QWZcUcoFU7WV3kHIckvdm551ETQMMONk8tpB6dkM4yh7dSXhZjSapaolihSSiV7SlsFh/jcva rfBzTogkwOQAHn9mOXYA== Subject: [Xen-devel] [PULL 3/4] qom: Fix error message in object_class_property_add() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefano Stabellini , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost , Paolo Bonzini , Paul Durrant , qemu-trivial@nongnu.org, Claudio Fontana , Cleber Rosa , Michael Tokarev , Laurent Vivier , Fabien Chouteau , Greg Kurz , KONRAD Frederic , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anthony Perard , xen-devel@lists.xenproject.org, David Gibson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Greg Kurz The error message in object_class_property_add() was copied from object_property_add() in commit 16bf7f522a2ff. Clarify that it is about a class, not an object. While here, have the format string in both functions to fit in a single line for better grep-ability, despite the checkpatch warning. Signed-off-by: Greg Kurz Reviewed-by: Laurent Vivier Message-Id: <157287383591.234942.311840593519058490.stgit@bahia.tlslab.ibm.com> Signed-off-by: Laurent Vivier --- qom/object.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qom/object.c b/qom/object.c index 6fa9c619fac4..d51b57fba11e 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1106,9 +1106,8 @@ object_property_add(Object *obj, const char *name, const char *type, } if (object_property_find(obj, name, NULL) != NULL) { - error_setg(errp, "attempt to add duplicate property '%s'" - " to object (type '%s')", name, - object_get_typename(obj)); + error_setg(errp, "attempt to add duplicate property '%s' to object (type '%s')", + name, object_get_typename(obj)); return NULL; } @@ -1139,9 +1138,8 @@ object_class_property_add(ObjectClass *klass, ObjectProperty *prop; if (object_class_property_find(klass, name, NULL) != NULL) { - error_setg(errp, "attempt to add duplicate property '%s'" - " to object (type '%s')", name, - object_class_get_name(klass)); + error_setg(errp, "attempt to add duplicate property '%s' to class (type '%s')", + name, object_class_get_name(klass)); return NULL; }