From nobody Mon Feb 9 07:23:03 2026 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=1618862339; cv=none; d=zohomail.com; s=zohoarc; b=h66DXilVovOMV8819HJebqqdXFuVMYLX6Epuh/TR9ExRaCx1AuO1DPJ1fEczpfELjAw3JdKZKF3VOEKbRXXHrF//Y4q6Fx+gnI5mm0LEqsOKmvb3q3+vgZre8c25uzaajEsWejDObL4xJct6geXbe0B6l6a3SOcFtw10H1ZKgHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618862339; 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=Gj4lzynoXEvzGR1FErSY20W68A25AXO+LeASPiFmMCk=; b=It4WBMqnmak8/3PGrL6zMJPlulUocbE0R6J9o6xYzdY/kQdEYXLYp0yH1ZyidE+Y4SK4ttEUixrCgNEW5ZNRLG8iOS0ZGGbLTtPdfTzAA7L2zMiYMH9cYIPU89xpJS8Qr8PnpuwjAm+VhALt3II04RNdrSgS5smlazdKGbghc+0= 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 1618862338956863.0620699712634; Mon, 19 Apr 2021 12:58:58 -0700 (PDT) Received: from localhost ([::1]:34790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYa2r-0004TX-Jv for importer@patchew.org; Mon, 19 Apr 2021 15:58:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYZZ6-0000Gs-1g; Mon, 19 Apr 2021 15:28:12 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:57171) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYZZ3-0005FU-5i; Mon, 19 Apr 2021 15:28:11 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1507421C6; Mon, 19 Apr 2021 15:28:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 19 Apr 2021 15:28:07 -0400 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 C1C041080064; Mon, 19 Apr 2021 15:28:04 -0400 (EDT) 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= Gj4lzynoXEvzGR1FErSY20W68A25AXO+LeASPiFmMCk=; b=y/Q3euSodSCs63Gv W2ms+2PuvAjDYzdSvSETadWk6Dl8kCDw+yM7annSbV1fKXrY8GNmx2VYFjdUKVrz pn86aAv0sV2G4waBD9jbwXtUg6DGh3mVbMsqO0/ksphwFqPE1+ZlkY0aI/AB76jJ sV7iqAW75PiFgwOTJhGSgE3I7D2CvlTRsLc6X0HbXzyNXoqNBb98gDlj978jDr2K /bMvtJx9hmWu8Tdi931X+e9pAndtO9AyiY/qg0oypiij/BtpFnuDyBU/WxuebFdV Q22FhYqXwKXCbY75CdkWDouhrFTv9I4AqxKk1PKHxZla43IDBGcet4cbMPEjqghZ eMbAww== 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=Gj4lzynoXEvzGR1FErSY20W68A25AXO+LeASPiFmM Ck=; b=sB7ew2qd0IKKGjO6V8G67JgaE9WRNXy04jSFky245Yt98qLUOGXS1zasW X2rFJoJB2jqwSYnXTMpPPGvcR9Mehcm4o4ENu6qjlW+XqZ0UzuDQyZZmNTgLBW4B jX74Wm701x7yJw6slaijwoJD1fxqdUOgtNItGe5hjP0r1R/Ijso+285dWvle3G4r xsnu0+zTQa+0Bw4cIZYno6CC2NxAIB7GnJaRfwef/5+dO2MsefGxtuNoXto44Zo8 hw7OkP88SEc6YhNjoTV7SJyZaLRWbQgFNpApMtohEwTcixr3BfaC8J4vJLBm753k JYbgMX48JJ1a6b+mTgAJMSkxZsMfQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddtgedgudeflecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefmlhgr uhhsucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrg htthgvrhhnpeetveeuudegveeiheegieelueeftedvtdekteefleegheduhfejueelvdfh ffdtgeenucfkphepkedtrdduieejrdelkedrudeltdenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehithhssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH 01/14] hw/block/nvme: rename __nvme_zrm_open Date: Mon, 19 Apr 2021 21:27:48 +0200 Message-Id: <20210419192801.62255-2-its@irrelevant.dk> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419192801.62255-1-its@irrelevant.dk> References: <20210419192801.62255-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=64.147.123.21; envelope-from=its@irrelevant.dk; helo=wout5-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_H4=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 , Thomas Huth , qemu-block@nongnu.org, Klaus Jensen , Max Reitz , Keith Busch , Klaus Jensen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Klaus Jensen Get rid of the (reserved) double underscore use. Cc: Philippe Mathieu-Daud=C3=A9 Cc: Thomas Huth Signed-off-by: Klaus Jensen Reviewed-by: Thomas Huth --- hw/block/nvme.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 624a1431d072..002c0672b397 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -1682,8 +1682,12 @@ static void nvme_zrm_auto_transition_zone(NvmeNamesp= ace *ns) } } =20 -static uint16_t __nvme_zrm_open(NvmeNamespace *ns, NvmeZone *zone, - bool implicit) +enum { + NVME_ZRM_AUTO =3D 1 << 0, +}; + +static uint16_t nvme_zrm_open_flags(NvmeNamespace *ns, NvmeZone *zone, + int flags) { int act =3D 0; uint16_t status; @@ -1707,7 +1711,7 @@ static uint16_t __nvme_zrm_open(NvmeNamespace *ns, Nv= meZone *zone, =20 nvme_aor_inc_open(ns); =20 - if (implicit) { + if (flags & NVME_ZRM_AUTO) { nvme_assign_zone_state(ns, zone, NVME_ZONE_STATE_IMPLICITLY_OP= EN); return NVME_SUCCESS; } @@ -1715,7 +1719,7 @@ static uint16_t __nvme_zrm_open(NvmeNamespace *ns, Nv= meZone *zone, /* fallthrough */ =20 case NVME_ZONE_STATE_IMPLICITLY_OPEN: - if (implicit) { + if (flags & NVME_ZRM_AUTO) { return NVME_SUCCESS; } =20 @@ -1733,12 +1737,12 @@ static uint16_t __nvme_zrm_open(NvmeNamespace *ns, = NvmeZone *zone, =20 static inline uint16_t nvme_zrm_auto(NvmeNamespace *ns, NvmeZone *zone) { - return __nvme_zrm_open(ns, zone, true); + return nvme_zrm_open_flags(ns, zone, NVME_ZRM_AUTO); } =20 static inline uint16_t nvme_zrm_open(NvmeNamespace *ns, NvmeZone *zone) { - return __nvme_zrm_open(ns, zone, false); + return nvme_zrm_open_flags(ns, zone, 0); } =20 static void __nvme_advance_zone_wp(NvmeNamespace *ns, NvmeZone *zone, --=20 2.31.1