From nobody Wed Oct 29 22:55:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1525846068381983.4523914905801; Tue, 8 May 2018 23:07:48 -0700 (PDT) Received: from localhost ([::1]:54700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGIGR-00051b-JW for importer@patchew.org; Wed, 09 May 2018 02:07:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGIA7-0008RK-U3 for qemu-devel@nongnu.org; Wed, 09 May 2018 02:01:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGIA7-0005PK-59 for qemu-devel@nongnu.org; Wed, 09 May 2018 02:01:16 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:45912) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGIA7-0005Oy-0Q for qemu-devel@nongnu.org; Wed, 09 May 2018 02:01:15 -0400 Received: by mail-qk0-x242.google.com with SMTP id c64so1793596qkf.12 for ; Tue, 08 May 2018 23:01:14 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id 42-v6sm1707217qte.41.2018.05.08.23.01.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 May 2018 23:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jr5+WRNGQmZKUpx1I+Oqpv67ZKrD8zNIBtp0rssEOv0=; b=SqM+2CARkX3kRv3Wxtkz8nq+Qw1sAlkB6rCNvP/rX87FRYfssSqdmW3XU3C4oYDOl1 hwKxmXKTHnlXfn70AfxCOM+om1igw6yBxsKY/ty3QRmXnX4qYxr11OjXlA4Is/D9F+/v N+E5WP6v7bgOOCWZGYlAmen7hDz7Mj5C2+F/hDsaanJZt0MCkl3jsLRFaaAO79fVQF07 MiadxrJHVmhnlbuO24Wjb3o22vO+0bboZnplUO3hUrXDGDMGkLgNUkngB5rHdTn0PDMD jaohrIrqbFjoOV06lRRwcodrvY08+14Hh5Ms9fhAhArvVLUCz6jsEPPV5K/5nNsZqCs8 wE7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jr5+WRNGQmZKUpx1I+Oqpv67ZKrD8zNIBtp0rssEOv0=; b=KKaxLZ/2vMlBHk3phTnU43VSy6K1J58yiAo1cdWZYWpGVyM+PPf1C9JayEi9wz7+cl eijnsGKjGWhaoLHS1RzoGgUF3VMGmlbrHi0W2wrTX2/W4ZN5zzXkLZvFyV8arBpkLpTw G8lQCmmNpeQnL8aCODJMBUjFIkNpCkLq5yd1r38ZFfsm3sJNE2I6zSrb6LC+AU/fwSFV ll4bBJtTY+3cFk5hVqVwhN1W4DdDDgyu5bbbLdaGyG8lvjKV4hlPvAPcdOmM638rsMmf zjdhBdCE6XVaFIrvQmXLjO/7822myT0MpQ4WfJepQSwKSBmK0xAecpeQHnBSQtVyhHgg Zy7g== X-Gm-Message-State: ALQs6tAgVPu4HyUfS7y0HqdAX9u9sgO4vX1+M28CVXlDbZMMDBTCHUwa ssUbcElC725roCIlVSv/vn0OU3mc X-Google-Smtp-Source: AB8JxZq4gXcufZGJct5MonChSlnM/Lx8x9wT5K95XdBrJFjk9sVosZ1y2tQ0lCD3ZNNOBtDUPVnvgw== X-Received: by 10.233.232.197 with SMTP id a188mr37305772qkg.312.1525845674213; Tue, 08 May 2018 23:01:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Peter Maydell , "Edgar E . Iglesias" , Alistair Francis Date: Wed, 9 May 2018 03:01:01 -0300 Message-Id: <20180509060104.4458-2-f4bug@amsat.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180509060104.4458-1-f4bug@amsat.org> References: <20180509060104.4458-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::242 Subject: [Qemu-devel] [PATCH v2 1/4] sdcard: Update the SDState documentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Add more descriptive comments to keep a clear separation between static property vs runtime changeable. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/sd/sd.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 235e0518d6..5fb4787671 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -90,12 +90,15 @@ struct SDState { uint32_t card_status; uint8_t sd_status[64]; =20 - /* Configurable properties */ + /* Static properties */ + BlockBackend *blk; bool spi; =20 - uint32_t mode; /* current card mode, one of SDCardModes */ - int32_t state; /* current card state, one of SDCardStates */ + /* Runtime changeables */ + + uint32_t mode; /** current card mode, one of #SDCardModes */ + int32_t state; /** current card state, one of #SDCardStates */ uint32_t vhs; bool wp_switch; unsigned long *wp_groups; @@ -109,8 +112,9 @@ struct SDState { uint32_t pwd_len; uint8_t function_group[6]; uint8_t current_cmd; - /* True if we will handle the next command as an ACMD. Note that this = does - * *not* track the APP_CMD status bit! + /** + * #True if we will handle the next command as an ACMD. + * Note that this does *not* track the APP_CMD status bit! */ bool expecting_acmd; uint32_t blk_written; --=20 2.17.0