From nobody Thu May 16 02:38:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1613057201; cv=none; d=zohomail.com; s=zohoarc; b=RMruJEcYhH9C7migWK4yU6IzAvAWdBJqN7fMRFOVeGXutecWz5qiOSLeq49VLW4r6O1jYmSYBcyXniAgEnqPT2INSwvxl8KFbl/T2tR8O5ueEPFTJtAPLd6DtTy0u+33kgUZngvdVdY07kutfqqYLY5XX+5DVkcONOOD2tmo+t8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057201; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BfmdEzUgdDIvbg50pRo8Nb4WiAmDuGDTyLLtnjnm9sc=; b=KRCcva/brcxnrfWyQjxFK6yOzgdfGIB7BofbjeDxVH9jqmAK59MfV/LFgOQkDRIP3ahuvimopPrM0tm/qZQ8BrSWlhqp8jysSH4ZnJIfqXAW/+pw9uXAnzzzJHbB78QsMF6Ggj58/w4Q/ohZSKlUVRVQcPZ9tQgK0ZqS7jOUC0c= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161305720147448.55844999728845; Thu, 11 Feb 2021 07:26:41 -0800 (PST) Received: from localhost ([::1]:37188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lADrc-0005mG-Dh for importer@patchew.org; Thu, 11 Feb 2021 10:26:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lADmt-0003bC-PA; Thu, 11 Feb 2021 10:21:47 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:56977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lADmr-0003jD-Ua; Thu, 11 Feb 2021 10:21:47 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 1786E5C00DC; Thu, 11 Feb 2021 10:21:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 11 Feb 2021 10:21:45 -0500 Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id 9E06324005B; Thu, 11 Feb 2021 10:21:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=BfmdEzUgdDIvb g50pRo8Nb4WiAmDuGDTyLLtnjnm9sc=; b=hi/OeyKxUxnP7QtVxRM/U6j/e7uPa viV9lVngoTTQrz3mPo88t8Ut3r+LVE80Lg3USCyfgTRqBlIX6u+JFg3SnwbEAiYr k+Mfh4n1BvUwRSvxb3dxRCeWtIznKW43TIAFb+wGutffKCLyKXc/836dUJZJAbWv 98E0k6HrgZwmTQscMD0D8MWaJGj3WAu/VwsNeinvUPULw2OJR4DCdMbLf+1thuLV IV7b+WyzQaX2dpowXPaja9MUdMvaYxY99H4pY1XIlYgFEKiGAsvjGoPGMHeHBBlw hZ8fzpfCsiGOKFC5VXzgBsXv82XIqgNkEMdd5U5iYEWv2jRndl4tqUoJg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=BfmdEzUgdDIvbg50pRo8Nb4WiAmDuGDTyLLtnjnm9sc=; b=Zep5RxOh VlqMy2SilF4RZiwoCE78chIJdjnf2I7KZ2HwhKBSub+0z4z5r+8vPK57XpONPAwW SDkTL3Z4Maq/KNJL5SC3oMaNA76dATtQGu+ghWZ0sOXCsxcbGEkjA0bYA5sIJjHn R5LrDrMFIH7LF5dolR3RBJmXZRMHK2f8AHOjw6JhZLwiOGRLJ86ROSDVo/S51HN3 6adNIoz7SWGtm/CJaLm679r4PcCP3QtOXtypafXAnYu4SSANuP8d4FfCFg7fmOEX CQ1BP50h9VGuByhkIpsgqr87PDKgTO6UJUiYUVPbKT/E0qceXk+37jpdKMBGBO5Q +ikpuxQoWHu3ng== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheelgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepmfhlrghushcu lfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrthhtvg hrnhepueelteegieeuhffgkeefgfevjeeigfetkeeitdfgtdeifefhtdfhfeeuffevgfek necukfhppeektddrudeijedrleekrdduledtnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepihhtshesihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: From: Klaus Jensen To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL v2 1/3] hw/block/nvme: fix legacy namespace registration Date: Thu, 11 Feb 2021 16:21:37 +0100 Message-Id: <20210211152139.1004257-2-its@irrelevant.dk> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210211152139.1004257-1-its@irrelevant.dk> References: <20210211152139.1004257-1-its@irrelevant.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=66.111.4.27; envelope-from=its@irrelevant.dk; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Kevin Wolf , qemu-block@nongnu.org, Klaus Jensen , Max Reitz , Keith Busch , Alexander Graf , Minwoo Im , Klaus Jensen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Klaus Jensen Moving namespace registration to the nvme-ns realization function had the unintended side-effect of breaking legacy namespace registration. Fix this. Fixes: 15d024d4aa9b ("hw/block/nvme: split setup and register for namespace= ") Reported-by: Alexander Graf Cc: Minwoo Im Tested-by: Alexander Graf Reviewed-by: Minwoo Im Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 5ce21b7100b3..02390f1f5230 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -4507,6 +4507,10 @@ static void nvme_realize(PCIDevice *pci_dev, Error *= *errp) if (nvme_ns_setup(ns, errp)) { return; } + + if (nvme_register_namespace(n, ns, errp)) { + return; + } } } =20 --=20 2.30.0 From nobody Thu May 16 02:38:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1613057148; cv=none; d=zohomail.com; s=zohoarc; b=OBHFr9T1MFtqexoWp6uTxxdVpaoTJrGWPXOYLSJG02Eq/uo37SJHATthtOV1WSiN+ISXUAx9HyXarLuYVxUUzztQlssDgIXYe3+2XG9nwDKKEvw3/4zwt+OX/ttzCgl18C0FXLZAEoRo1AsvbEGdcLb6yVeH5xOO8UXLSFuiud8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057148; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BUB+PaVtIckRpPtKtaCZru27TXBaa+MPpa0dMGEOpKI=; b=Li2g+QP5lC0lcH7HH099H0PBv3+AJUVRhdKs/cWJLp0aFcp2t30WyQxweh4NnNm8NeE8B5hQ5W3EmESqriZoUW/n4v/8CVbpsKroLa+tI03LjfPn5lbe3SIQFPHsvKaOz1eXtL02Tw6/5KxNwSkC7Kj2s61Ss3SEAua85ZFBTq0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613057147436292.07112397096125; Thu, 11 Feb 2021 07:25:47 -0800 (PST) Received: from localhost ([::1]:36514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lADqk-0005VS-3B for importer@patchew.org; Thu, 11 Feb 2021 10:25:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lADmu-0003bR-0L; Thu, 11 Feb 2021 10:21:48 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:41331) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lADms-0003jc-F6; Thu, 11 Feb 2021 10:21:47 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B13C75C00F5; Thu, 11 Feb 2021 10:21:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 11 Feb 2021 10:21:45 -0500 Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id 18223240057; Thu, 11 Feb 2021 10:21:43 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm2; bh= BUB+PaVtIckRpPtKtaCZru27TXBaa+MPpa0dMGEOpKI=; b=shv9BHKVYrPZzgy5 Dtn7PAiKOtrOEufdA7m96UP3Zov5RuiZbONiZ7dC+Ls/N5YqWCkkq5nwBNciHz4b Kcr+Gv6ILLsEfRykhfzYdj5Tdcdq7cYwiN0W+DMNE4oibze9uFOqHCrQNOHZdO4T Da8MqIEWSrJ1BcaX+m8wXB1UhGlCj4qPIBjqJApPvDDhoTCP2N/zfioIPkXe4m4H 4GECOXTJAObCBaM4SLW3UkDvOiCIWJMU25JGLpMs9/PUb9BJhwgw5b3UK41+PMB3 x15mA3bOYOXbD95Ln+094T9z7RtJ5lUiaHi4T/VtrreKqnWaWdZQLIO6JMqGYhHB 65mHIQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=BUB+PaVtIckRpPtKtaCZru27TXBaa+MPpa0dMGEOp KI=; b=VsjGooICZdZRSRW2b3hjFsyhpxscBotRs0b4qbcGaofuF0FM+AKo/KHDx VcFUOBp0ghKr+unqJJXHcbEVifhzj35OcuUHT18ZXG33mhJWBSJ8p93TChAUQtEK eyPcAsH8gKJ9Z3MjIChZ5Y+rQlvR+11jmA7hb4OWWgyHQ86lEH1rAcpDApGbXm2d s3fcQ4hAG2bqn8rNLAJ9ITHAI+rtpH/5xe4edovLRcjiyOYgmL9EoIYGj0xOm2k/ zBfn9UoWRLCe0XlTnuMwQ7aTEILhZKdD0SPDudMD7UZCfM/4tmolDkxiNyx2EJv9 ehIeLvTlrPNw9fJyDB7QtXdbI4lyw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheelgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeetveeuudegveeiheegieelueeftedvtdekteefleegheduhfejueelvdfhffdt geenucfkphepkedtrdduieejrdelkedrudeltdenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehithhssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL v2 2/3] hw/block/nvme: Fix a build error in nvme_get_feature() Date: Thu, 11 Feb 2021 16:21:38 +0100 Message-Id: <20210211152139.1004257-3-its@irrelevant.dk> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210211152139.1004257-1-its@irrelevant.dk> References: <20210211152139.1004257-1-its@irrelevant.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=66.111.4.27; envelope-from=its@irrelevant.dk; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Kevin Wolf , qemu-block@nongnu.org, Klaus Jensen , Bin Meng , Max Reitz , Keith Busch , Klaus Jensen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng Current QEMU HEAD nvme.c does not compile with the default GCC 5.4 on a Ubuntu 16.04 host: hw/block/nvme.c:3242:9: error: =E2=80=98result=E2=80=99 may be used unini= tialized in this function [-Werror=3Dmaybe-uninitialized] trace_pci_nvme_getfeat_vwcache(result ? "enabled" : "disabled"); ^ hw/block/nvme.c:3150:14: note: =E2=80=98result=E2=80=99 was declared here uint32_t result; ^ Explicitly initialize the result to fix it. Fixes: aa5e55e3b07e ("hw/block/nvme: open code for volatile write cache") Fixes: Coverity CID 1446371 Signed-off-by: Bin Meng Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 02390f1f5230..fb83636abdc1 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -3228,6 +3228,7 @@ static uint16_t nvme_get_feature(NvmeCtrl *n, NvmeReq= uest *req) result =3D ns->features.err_rec; goto out; case NVME_VOLATILE_WRITE_CACHE: + result =3D 0; for (i =3D 1; i <=3D n->num_namespaces; i++) { ns =3D nvme_ns(n, i); if (!ns) { --=20 2.30.0 From nobody Thu May 16 02:38:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1613064393; cv=none; d=zohomail.com; s=zohoarc; b=OoqTHt8NwBv3HVoa5XnaJCYviWY/gCx0iwq7HjdPgqEY64o0YDKejrrb6wMBcMuJVD+9jH9/PGioLekToWitnZ2cZww0gXJpJH1W9Gc7TU6zVyFGV5kqfnYrFaxwzrnUC5ft+WK/xQ99XvCajt+ExQZn9u9FKwWtZbnaezavo+A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613064393; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/qiaKh/Umj0v0u+CwNpOqgCztOzHKADBAylv/jX6NO0=; b=n/HuG9IfaN+GgCRgeuSanC8gH4k0Z9hcWsHgG57utgd7MkY/f273ATEDHFj+VLjUtwccUsPqkFDPoUwVGxr7mMCkxB5b5ZVEAk7/j/TrrGEdOxHcZJKxOy0TLYom1HgC3Zi2ToxC+SgDkS0PQhqiysWBKsr8cWcnLOXq3xpbS78= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613064393276649.0620838899116; Thu, 11 Feb 2021 09:26:33 -0800 (PST) Received: from localhost ([::1]:51388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lADys-0003ZU-J6 for importer@patchew.org; Thu, 11 Feb 2021 10:34:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lADmv-0003cI-6Z; Thu, 11 Feb 2021 10:21:49 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:53103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lADmt-0003k7-Nf; Thu, 11 Feb 2021 10:21:48 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id EE6E15C00A4; Thu, 11 Feb 2021 10:21:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 11 Feb 2021 10:21:46 -0500 Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id 6DBFA240062; Thu, 11 Feb 2021 10:21:45 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=/qiaKh/Umj0v0 u+CwNpOqgCztOzHKADBAylv/jX6NO0=; b=KSwWcyF+VeaZ1APqiVZtM7rLL1pF4 hQRF0AUYApY6hmCUYhNxfHFUPkMSWj+mowiensG8QiQ/seAHhRJgEp5pf1gn+a6o 2ycKBKHn48e1SDq51c4uqdlI1XfxjVGLMXXJ3dyImsPyBatm+qLQoEizUasccFIJ FegsfIjJF/XgahTjQj4pWX+Y97RkWtWxQUj2kwdE9t252z3bXDB2mRMstiYhnOv/ 0tAV1P0ZfErQBUuc5Nc0Td6W5FlNGZnLnnastZbPAn3QocRWzLv9Xar4Wac2IS+Y t+KcpwoR+1AlFPmJ32SxhpZfJN/Xp85xWznzSYcVD9mm7oCy/aUn19sLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=/qiaKh/Umj0v0u+CwNpOqgCztOzHKADBAylv/jX6NO0=; b=iq8nCxv6 qXWksR/9bEzL+yXKXBifIUrHnT9O+Q1skbW0r89cDfMYn+DYLe1RHNHl1PVXq9Z1 +9S9KOHrgvtE+aQxwO6JlpiWTqhinOMc8yoTfoGjJLoFt0bptFm5L5UiOeiSEjLj 6+NX/fFlQA1gphrEHXmKlhsazvD2FkmMU335lR3s9mO4A+MZTlDSCF2WKmnrAwo+ ldKS/PTcVY1TGJKJHYkiFWiw/JvoE4zOFfe1qlBXKPdtZ/WQrmpkH2pDv/R5wKyj 0EeAEol1yK8veDSBg6Xhpj08ffJ7euPfS25uPrBVmPwRafuzo1JCIQCxUYE/hDhC k1613lCsT2uHNg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheelgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepmfhlrghushcu lfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrthhtvg hrnhepueelteegieeuhffgkeefgfevjeeigfetkeeitdfgtdeifefhtdfhfeeuffevgfek necukfhppeektddrudeijedrleekrdduledtnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepihhtshesihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: From: Klaus Jensen To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL v2 3/3] hw/block/nvme: fix error handling in nvme_ns_realize Date: Thu, 11 Feb 2021 16:21:39 +0100 Message-Id: <20210211152139.1004257-4-its@irrelevant.dk> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210211152139.1004257-1-its@irrelevant.dk> References: <20210211152139.1004257-1-its@irrelevant.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=66.111.4.27; envelope-from=its@irrelevant.dk; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Kevin Wolf , qemu-block@nongnu.org, Klaus Jensen , Max Reitz , Keith Busch , Minwoo Im , Klaus Jensen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Klaus Jensen nvme_ns_realize passes errp to nvme_register_namespaces, but then try to prepend errp with local_err. Just remove the local_err and use errp directly. Fixes: 15d024d4aa9b ("hw/block/nvme: split setup and register for namespace= ") Cc: Minwoo Im Reviewed-by: Minwoo Im Signed-off-by: Klaus Jensen --- hw/block/nvme-ns.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c index dfed71a950fa..93ac6e107a09 100644 --- a/hw/block/nvme-ns.c +++ b/hw/block/nvme-ns.c @@ -358,17 +358,12 @@ static void nvme_ns_realize(DeviceState *dev, Error *= *errp) NvmeNamespace *ns =3D NVME_NS(dev); BusState *s =3D qdev_get_parent_bus(dev); NvmeCtrl *n =3D NVME(s->parent); - Error *local_err =3D NULL; =20 - if (nvme_ns_setup(ns, &local_err)) { - error_propagate_prepend(errp, local_err, - "could not setup namespace: "); + if (nvme_ns_setup(ns, errp)) { return; } =20 if (nvme_register_namespace(n, ns, errp)) { - error_propagate_prepend(errp, local_err, - "could not register namespace: "); return; } =20 --=20 2.30.0