From nobody Fri Oct 31 16:16:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=invisiblethingslab.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1748182836674247.28810343554153; Sun, 25 May 2025 07:20:36 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.997154.1378140 (Exim 4.92) (envelope-from ) id 1uJCD5-0006BW-2Y; Sun, 25 May 2025 14:20:19 +0000 Received: by outflank-mailman (output) from mailman id 997154.1378140; Sun, 25 May 2025 14:20:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uJCD4-0006BL-Vq; Sun, 25 May 2025 14:20:18 +0000 Received: by outflank-mailman (input) for mailman id 997154; Sun, 25 May 2025 14:20:18 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uJCD4-0006Ah-Dd for xen-devel@lists.xenproject.org; Sun, 25 May 2025 14:20:18 +0000 Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 60c7751d-3973-11f0-b893-0df219b8e170; Sun, 25 May 2025 16:20:16 +0200 (CEST) Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 2D70C25400CC; Sun, 25 May 2025 10:20:15 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sun, 25 May 2025 10:20:15 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 25 May 2025 10:20:13 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 60c7751d-3973-11f0-b893-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1748182815; x=1748269215; bh=nvcA2fXb3e hl89J7/qQltbJE5fahzJ7yWRoiR9gW1UA=; b=N7xmPgvQPZcNs9lOryH9mVo0H2 C/IMDast8elvfpA7z4GK4FC9KtXik2CKq5cQgep7UrNSlve3fom8gGMCsKtTxTXd wKmjdjcW8VQ3104kRF9ldRH63pXNilT4SKDcvj5NuWKVnvtJIEPJiIxpiL6oOuJR oSW/xipriiITpzsF/N0GWi7rnC/EwokrVItsP/gkVlAe4zBt9LS3709/iGmRyram YTsgO6cKMx3D6obygIQa5p3gBcFftAI5jwyVZ3fl9HohxQyAFD0oK8Qu1iFqvbDm BN/wCG/aO2NRCzQdckuB8O3OS9qKwQqQ4ZChLqH1ps2TJg1Z0kQq7DlK1AcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1748182815; x= 1748269215; bh=nvcA2fXb3ehl89J7/qQltbJE5fahzJ7yWRoiR9gW1UA=; b=X XtrMxeAK/jPJSKa3qy4t50Q+dIe/AwjbOrOR4Fz7gr1zS+NFoIMoLghJrTW1Loyq p38mTYO4/WVQeDjAZ/+iPC5lnXNV39p1OgMVUhOka/Dh4hZ+poign3YXWDGgcJz/ kl3Nw7cizV05yon97NW4At+j6LfknwoM0V46iJzlfZeAZNAr0KpPakM18AA+psYw rhhdZTZkffBbfIp+sKfehKMFC6bX8uQ+piF4ZlFwzIVBX5qrTMq3eaPWhlMPXBwc 3NK50R6ZazKciR9ocVifr9GdREpp9Kvtk/lmpnx3Ledg2JoePqxUX7wQg3RnvUZj VVCyELCWkb3IIRWEEbzVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddugeekfeculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffo jghfgggtgfesthekredtredtjeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofi hskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhn ghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepgfeuudehgfdvfeehhedujeehfe duveeugefhkefhheelgeevudetueeiudfggfffnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvth hhihhnghhslhgrsgdrtghomhdpnhgspghrtghpthhtohepledpmhhouggvpehsmhhtphho uhhtpdhrtghpthhtohepgigvnhdquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtg htrdhorhhgpdhrtghpthhtohepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhn ghhslhgrsgdrtghomhdprhgtphhtthhopegrnhgurhgvfidrtghoohhpvghrfeestghith hrihigrdgtohhmpdhrtghpthhtoheprghnthhhohhnhidrphgvrhgrrhgusehvrghtvghs rdhtvggthhdprhgtphhtthhopehmihgthhgrlhdrohhriigvlhesrghmugdrtghomhdprh gtphhtthhopehjsggvuhhlihgthhesshhushgvrdgtohhmpdhrtghpthhtohepjhhulhhi vghnseigvghnrdhorhhgpdhrtghpthhtoheprhhoghgvrhdrphgruhestghithhrihigrd gtohhmpdhrtghpthhtohepshhsthgrsggvlhhlihhniheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v1 3/5] drivers/char: make dbc_uart_dump() a bit more useful Date: Sun, 25 May 2025 16:15:44 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1748182837305116600 Make it safe to call also if xhci console is not enabled. And make it non-static, to require one less modification when actually using it. When using it, one still needs to add its declaration in some header (or just next to the call site). Signed-off-by: Marek Marczykowski-G=C3=B3recki --- IIUC Misra would not be happy about a declaration of an usused function. And I'd rather avoid extending DBC_DEBUG scope beyond that single file. --- xen/drivers/char/xhci-dbc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/drivers/char/xhci-dbc.c b/xen/drivers/char/xhci-dbc.c index c4bb371ff78f..ced28cae0a29 100644 --- a/xen/drivers/char/xhci-dbc.c +++ b/xen/drivers/char/xhci-dbc.c @@ -1498,11 +1498,14 @@ static void dbc_dump(struct dbc *dbc) readq(&r->cp) =3D=3D virt_to_maddr(dbc->dbc_ctx)); } =20 -static void dbc_uart_dump(void) +void dbc_uart_dump(void) { struct dbc_uart *uart =3D &dbc_uart; struct dbc *dbc =3D &uart->dbc; =20 + if ( !dbc->enable ) + return; + dbc_dump(dbc); } #endif --=20 git-series 0.9.1