From nobody Mon Feb 9 08:56:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603964009; cv=none; d=zohomail.com; s=zohoarc; b=cC3CVdnxyp4cELYPcR+6uJGxMOhuKOXEohCXulMM5WK8IYYeIU+DToTLeY91jOUgqwuy6ClCIPKWKJg3i9xVdVZrov6ryxGIYcHlOdfHsDLSMw52JE+CAJaqRw7Ba+v1/jSVMp5RZtCc7zo9Rjg1u9DOFL0WueaJpAcc6xtJ3A0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603964009; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=hraDvgDvE6lqUS9SKN8n1vi9r/o4Ua52Hm0UVRZeM1o=; b=XGctz+NlfnTtjHjA4x+yLxqUiouZcZ/ARRjDwP2ayK9mvkSCyP0oh1DIz8wrz/9zrUZeLpmtd4cdH+6irG30bvJtR4LRLvKvld1aW5+oHfxCA/rSXXMRNLrEBhPNdwCIH77CSpMKwEmnkqBv8rhU7kc3mv6xkNtTlCE23KwINoY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 160396400982458.39175426330553; Thu, 29 Oct 2020 02:33:29 -0700 (PDT) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-588-eyJJdw2WP1KeEvg99ZDsMA-1; Thu, 29 Oct 2020 05:33:27 -0400 Received: by mail-ej1-f69.google.com with SMTP id z8so948141ejw.3 for ; Thu, 29 Oct 2020 02:33:26 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id os11sm1126198ejb.104.2020.10.29.02.33.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 02:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603964008; 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=hraDvgDvE6lqUS9SKN8n1vi9r/o4Ua52Hm0UVRZeM1o=; b=iJ2dyWzFTjVEQgiS1FiRm1E2T30op/zRGDz17DjilV6r1Klbq7kQA8bPSNuXMekd782m9q zw9yKNlBhpikrvQZln17inMC+Iu3ccv2CxxDWPtJiylMaQWR4LcKdOy82cobvbLihLNwR5 u8yfkeNvr1AyI716IVlwVeY9HtVKEDU= X-MC-Unique: eyJJdw2WP1KeEvg99ZDsMA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hraDvgDvE6lqUS9SKN8n1vi9r/o4Ua52Hm0UVRZeM1o=; b=hQTmvI9Te9VBoP4wsMBcgl2GmNyntLp/A/Kz80CsNVF5AcOTOnl67TZjc9gNfEdm5H S7VN2yiRHQCUV9OpDffSlz9yUN76e1oR30YBmbsBFebvo8Ebcs9SiA2GBNnDEnKwE2KN /C30ATjlhJp4YuKecz84R10J4fPjA417kGfUo8GjohlCINl7GnG7rKj64wBd2KQwgHKM y7jBF1LbA/xCvS4UWpO2gVBqppZtYC3YWiUUkk0mSs2eCn80tkt5VFTqWCm702gGVfhJ QSVBMyZmz+FE/jbE3HgJW8GQ6gEo0qnlwnl4+pg4j31d2d7R8mFK2v8qh3GTPOF0c4D+ q6Sw== X-Gm-Message-State: AOAM533X/38GY8POKwJlr1UN1S5mHhDnzcGmpWDC4jVOGNh0b6jAeO7v 5pwTJOprpccMlHbHEvlILhx50IvJLM+4KqyReLtu2gkPUelOlXbCcRIooNVZxqLwR5wR2KldpQ4 Lg8ca/oXQugYYeg== X-Received: by 2002:a17:906:68cd:: with SMTP id y13mr2995399ejr.230.1603964005694; Thu, 29 Oct 2020 02:33:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxL1Mrs2QuCn8mg3yOsAVD6nuPyNXSDBC6f2UKIVtsts6WHymgLL6DoCvIlNkMGzbLsgAAvtA== X-Received: by 2002:a17:906:68cd:: with SMTP id y13mr2995386ejr.230.1603964005494; Thu, 29 Oct 2020 02:33:25 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Stefan Hajnoczi , Kevin Wolf , Klaus Jensen , Eric Auger , Max Reitz , Fam Zheng , Keith Busch , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-5.2 v2 03/25] block/nvme: Report warning with warn_report() Date: Thu, 29 Oct 2020 10:32:44 +0100 Message-Id: <20201029093306.1063879-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201029093306.1063879-1-philmd@redhat.com> References: <20201029093306.1063879-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Instead of displaying warning on stderr, use warn_report() which also displays it on the monitor. Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- block/nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index 739a0a700cb..6f1d7f9b2a1 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -399,8 +399,8 @@ static bool nvme_process_completion(NVMeQueuePair *q) } cid =3D le16_to_cpu(c->cid); if (cid =3D=3D 0 || cid > NVME_QUEUE_SIZE) { - fprintf(stderr, "Unexpected CID in completion queue: %" PRIu32= "\n", - cid); + warn_report("NVMe: Unexpected CID in completion queue: %"PRIu3= 2", " + "queue size: %u", cid, NVME_QUEUE_SIZE); continue; } trace_nvme_complete_command(s, q->index, cid); --=20 2.26.2