From patchwork Tue Mar 10 18:05:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 1252334 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NYfupQJX; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48cNNH6yl1z9sSs for ; Wed, 11 Mar 2020 05:07:27 +1100 (AEDT) Received: from localhost ([::1]:38054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBjHp-0001h5-RK for incoming@patchwork.ozlabs.org; Tue, 10 Mar 2020 14:07:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51613) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBjFs-0007db-GJ for qemu-devel@nongnu.org; Tue, 10 Mar 2020 14:05:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBjFr-00054G-FQ for qemu-devel@nongnu.org; Tue, 10 Mar 2020 14:05:24 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:39258 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBjFr-0004yG-9G for qemu-devel@nongnu.org; Tue, 10 Mar 2020 14:05:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583863522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/IavJEhyr76wx/WQVJrlu2MafjZF0yd8qqzcsHJBa0k=; b=NYfupQJX2vYvD6gaeEiwjyKpQnraoDU69OgHeOejjXwF4RuY6cgpEw1ON1pEJkQ2YOF8ep 7g4a+lt/XAsN/ZFJLKjsKLMsGrikTPPKtLl3Vxktgt0V48cOs71qLMtxSsXFVArWRNltJT kTZ7ed5qpwJ1bPbtofXEyZmzX/Zwn50= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-401-AvrKYZPrPyOJgqPBXMIrrg-1; Tue, 10 Mar 2020 14:05:21 -0400 X-MC-Unique: AvrKYZPrPyOJgqPBXMIrrg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 030398017CC; Tue, 10 Mar 2020 18:05:20 +0000 (UTC) Received: from localhost.localdomain (ovpn-125-115.rdu2.redhat.com [10.10.125.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F52727184; Tue, 10 Mar 2020 18:05:18 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH 1/2] hw/mem/pc-dimm: Print slot number on error at pc_dimm_pre_plug() Date: Tue, 10 Mar 2020 15:05:09 -0300 Message-Id: <20200310180510.19489-2-wainersm@redhat.com> In-Reply-To: <20200310180510.19489-1-wainersm@redhat.com> References: <20200310180510.19489-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, imammedo@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The error report in pc_dimm_pre_plug() now has the slot number printed. Signed-off-by: Wainer dos Santos Moschetta --- hw/mem/pc-dimm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 8f50b8afea..36edfcf467 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -44,8 +44,8 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, &error_abort); if ((slot < 0 || slot >= machine->ram_slots) && slot != PC_DIMM_UNASSIGNED_SLOT) { - error_setg(&local_err, "invalid slot number, valid range is [0-%" - PRIu64 "]", machine->ram_slots - 1); + error_setg(&local_err, "invalid slot number %d, valid range is [0-%" + PRIu64 "]", slot, machine->ram_slots - 1); goto out; } From patchwork Tue Mar 10 18:05:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 1252333 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UmG1B1ub; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48cNMw2XQDz9sSW for ; Wed, 11 Mar 2020 05:07:08 +1100 (AEDT) Received: from localhost ([::1]:38042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBjHW-00017h-6s for incoming@patchwork.ozlabs.org; Tue, 10 Mar 2020 14:07:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51722) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBjFx-0007o1-5Q for qemu-devel@nongnu.org; Tue, 10 Mar 2020 14:05:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBjFw-0005WJ-4P for qemu-devel@nongnu.org; Tue, 10 Mar 2020 14:05:29 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:56714 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBjFw-0005Tj-04 for qemu-devel@nongnu.org; Tue, 10 Mar 2020 14:05:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583863527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=27otnlpCCc6Oj80P4U1wJDCLkbDt2NBJY+YO7yC4c2Q=; b=UmG1B1ubsfkdIgiufs6CDrmucLCNkVwNYvXRGDtnfCFkaF9gWqyHDX8eTHGjC/mH44YlFC 8nWgtrKWD+ZiNTl3A8l/7TYnGLytVw4a8IXPIBH8a459pb0XVSocpXpFowQPKLhk0iKIIe 1GJWoi7d9F7LYFzlDzZgMLJ5wIXjjZE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-171-7VVRL2bfPayd7ql-Cy4jzw-1; Tue, 10 Mar 2020 14:05:23 -0400 X-MC-Unique: 7VVRL2bfPayd7ql-Cy4jzw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 19FDC13EA; Tue, 10 Mar 2020 18:05:22 +0000 (UTC) Received: from localhost.localdomain (ovpn-125-115.rdu2.redhat.com [10.10.125.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9688519C7F; Tue, 10 Mar 2020 18:05:20 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH 2/2] hw/mem/pc-dimm: Fix line over 80 characters warning Date: Tue, 10 Mar 2020 15:05:10 -0300 Message-Id: <20200310180510.19489-3-wainersm@redhat.com> In-Reply-To: <20200310180510.19489-1-wainersm@redhat.com> References: <20200310180510.19489-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, imammedo@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Wainer dos Santos Moschetta --- hw/mem/pc-dimm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 36edfcf467..6d62588fea 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -218,7 +218,8 @@ static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm, Error **errp) static uint64_t pc_dimm_md_get_addr(const MemoryDeviceState *md) { - return object_property_get_uint(OBJECT(md), PC_DIMM_ADDR_PROP, &error_abort); + return object_property_get_uint(OBJECT(md), PC_DIMM_ADDR_PROP, + &error_abort); } static void pc_dimm_md_set_addr(MemoryDeviceState *md, uint64_t addr,