From patchwork Mon Aug 19 18:01:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 171657 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3327193ily; Mon, 19 Aug 2019 11:02:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqQHvDYlIzh4osXPuY6RBRWgzrnXy+n7wrVIbWqD6WpniYNOtQ/py5+nS8urQmDM+mUre1 X-Received: by 2002:a05:6638:143:: with SMTP id y3mr26559512jao.68.1566237772324; Mon, 19 Aug 2019 11:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566237772; cv=none; d=google.com; s=arc-20160816; b=L6JnS63ry9Aky9CABY+sGDmyJSY9IqFYCEvuzQ8/DpQJphcjGPB6kzPbARuJQ9qoG6 2AuKVKdG38aeOmNLzpVqz6u47BoYZ4T8aatlcSkDo5sN6t5klBAx5+TnKF2WtG0494dK XUXsrceDdeBxD8Vmx4+N0lm9qSZJ01b5ffPVi5i31Syj3jOmSavb60KUDNGcD/HveCt3 TTMMXtOPkVQ9JSEc0oLP6mKs2NTOPIznfn7Py7P6w7LDVL8TdM4Og5Jx6U1rPWDW8NyW xURGL4y1/qp+WVlbfIaNoEMAY/RhgJMnqI311Jvs82QjP5zb11iESJz+eIgM65y/TICH xtdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:message-id:date:to:from; bh=i3aUsOGqSVUV6u1eXQZLxvjMeWkj/XYVfoVOKhk7l7s=; b=JcpAmBqNfR4AWp9vBYNxxiMrfhRtbOixS7PPcuWFnq9hHRdmuPCZM4+TWNyq7H/FI9 5t0rR+loR13YpbTvDGsnCYuhFgmti1egLzjN1NxsfK7JD+gmjR6zanaTuu3Q/G+4F9sP GpcAa7ms1OVMMBU0b2c2VnmDvbsbZQfrmknXAN4NGb7N/V2YGPDivc4n57Wh+BnCifHM Ww0aZpnymm2cnHurCTGLxwT/L3JC3KFsMDXCDGNCryqaJLG5Rv4Mo2GjUsL1xKowWDj2 981SbyFRz0bVHChRuvFHNuYPL5n5VdV+ohyPymm5rcjWndpv1e5ZdGcijVfacPMxKkr7 n9+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id r2si17011968jao.112.2019.08.19.11.02.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Aug 2019 11:02:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) 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 1hzlyG-0001ps-Hk; Mon, 19 Aug 2019 18:01:32 +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 1hzlyF-0001ph-8P for xen-devel@lists.xenproject.org; Mon, 19 Aug 2019 18:01:31 +0000 X-Inumbo-ID: 5ee20440-c2ab-11e9-8bf0-12813bfff9fa Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 5ee20440-c2ab-11e9-8bf0-12813bfff9fa; Mon, 19 Aug 2019 18:01:30 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3B759360; Mon, 19 Aug 2019 11:01:30 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DAB6D3F246; Mon, 19 Aug 2019 11:01:28 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 19 Aug 2019 19:01:25 +0100 Message-Id: <20190819180125.17504-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Subject: [Xen-devel] [PATCH] xen/console: Fix build when CONFIG_DEBUG_TRACE=y 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: Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Commit b5e6e1ee8da "xen/console: Don't treat NUL character as the end of the buffer" extended sercon_puts to take the number of character to print in argument. Sadly, a couple of couple of the callers in debugtrace_dump_worker() were not converted. This result to a build failure when enabling CONFIG_DEBUG_TRACE. Spotted by Travis using randconfig Signed-off-by: Julien Grall --- xen/drivers/char/console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 2c14c2ca73..924d4971ca 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -1185,11 +1185,12 @@ static void debugtrace_dump_worker(void) /* Print oldest portion of the ring. */ ASSERT(debugtrace_buf[debugtrace_bytes - 1] == 0); - sercon_puts(&debugtrace_buf[debugtrace_prd]); + sercon_puts(&debugtrace_buf[debugtrace_prd], + strlen(&debugtrace_buf[debugtrace_prd])); /* Print youngest portion of the ring. */ debugtrace_buf[debugtrace_prd] = '\0'; - sercon_puts(&debugtrace_buf[0]); + sercon_puts(&debugtrace_buf[0], debugtrace_prd); memset(debugtrace_buf, '\0', debugtrace_bytes);