From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePGMb-00064x-Ty for qemu-devel@nongnu.org; Wed, 13 Dec 2017 18:22:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePGMb-0008Nf-2K for qemu-devel@nongnu.org; Wed, 13 Dec 2017 18:22:57 -0500 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:41082) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePGMa-0008N4-V1 for qemu-devel@nongnu.org; Wed, 13 Dec 2017 18:22:57 -0500 Received: by mail-qk0-x242.google.com with SMTP id 84so4156613qks.8 for ; Wed, 13 Dec 2017 15:22:56 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 13 Dec 2017 20:20:15 -0300 Message-Id: <20171213232025.24503-17-f4bug@amsat.org> In-Reply-To: <20171213232025.24503-1-f4bug@amsat.org> References: <20171213232025.24503-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 16/26] sdcard: let cmd_valid_while_locked() returns a bool List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alistair Francis , "Edgar E . Iglesias" , Peter Maydell , Andrew Baumann , Prasad J Pandit , Clement Deschamps Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Peter Crosthwaite , Sai Pavan Boddu Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 542170c3ec..b231411108 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1475,7 +1475,7 @@ static sd_rsp_type_t sd_app_command(SDState *sd, return sd_illegal; } -static int cmd_valid_while_locked(SDState *sd, SDRequest *req) +static bool cmd_valid_while_locked(SDState *sd, SDRequest *req) { /* Valid commands in locked state: * basic class (0) @@ -1489,7 +1489,7 @@ static int cmd_valid_while_locked(SDState *sd, SDRequest *req) return req->cmd == 41 || req->cmd == 42; } if (req->cmd == 16 || req->cmd == 55) { - return 1; + return true; } return sd_cmd_class[req->cmd & 0x3F] == 0 || sd_cmd_class[req->cmd & 0x3F] == 7; -- 2.15.1