From nobody Thu Oct 30 15:35:21 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 152545026672587.6263239724226; Fri, 4 May 2018 09:11:06 -0700 (PDT) Received: from localhost ([::1]:35106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEdIY-0003YA-1q for importer@patchew.org; Fri, 04 May 2018 12:11:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEd7e-0002dG-0v for qemu-devel@nongnu.org; Fri, 04 May 2018 11:59:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEd7d-0001ZS-BV for qemu-devel@nongnu.org; Fri, 04 May 2018 11:59:50 -0400 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:41213) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fEd7d-0001Yx-77 for qemu-devel@nongnu.org; Fri, 04 May 2018 11:59:49 -0400 Received: by mail-qt0-x241.google.com with SMTP id g13-v6so27950844qth.8 for ; Fri, 04 May 2018 08:59:49 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id a83sm8587066qkb.22.2018.05.04.08.59.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 May 2018 08:59:47 -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=OQO5eftao92svL8YbDXRKzHOz5p/Rg939Km06rK+/x0=; b=ucyqDscptcyNH9YVxPHzDEvSFk6iSAJ5HFOq2ct5qAP4VFyMhWu4Y1iTaHWea/WYN4 daPcGW7H5Ae9jrOeKotOXNiL2W7/OmtXlpCr4X4Z5nlRCI4Y04dVA7XiS/rqc3jvt77l h9/BXwsm0+UYgxr1XC3nvEr8W6xFztQHxeZUUV8BAy9DpoyUkHY6YEFHprVjtYktyLpv 9KOQE2/PjtvZWmrl0hz9eIvFSLDVDzXAr0u7NDI26gcJ0nXaTW7Arr65kDD/GLcAAedp hXmdwP8cJDiq2D3mAKw9DBabZf/pZI8dYMO3favykeBQDnrKEsUpyMtJUCkoN7PDNhqG YvSA== 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=OQO5eftao92svL8YbDXRKzHOz5p/Rg939Km06rK+/x0=; b=d5iwaY/de3v7/uuEmThjFSrLzoD4YEzEo8+WThjrrBlgZjCoAeioJVpqnJ6wveKAL2 pPsigacZNSMeyueoiemOPTGFV31m2SqN+M/Pju3N8Rosoer3rl5PCtUGddT2LImphZrR oMXwZ0ayIz5fGS8sfPRbK5mXAHDwywRC3eCQ7m8tX0moTWZ2URsMWQOyFYhGwPn0hjpu wfQ4yR/4TI6N1P0ZeZl+yB/gx4Puob+ar9oO8I0HkKyUcIGWuYT+R++QgTsuMy6mILZX FAdv0uxMhJ5z8uHArEjxj91CSlrL5+WUQPuP4gSzMebPpzl/zlt2b9HrrVSzmU0XZbWT t6PA== X-Gm-Message-State: ALQs6tCoqnrA90xW+1VvTYdQq8xWz7tpJT2gV4FkHMsBzjohr6/b6iQ9 IrSiKGi2H8ft/4NDJgePQwo= X-Google-Smtp-Source: AB8JxZpyxNI2DAJ374UufZ357ubhq+0dOE6wZxCqPLuafHdsnGTmvEagco5tu8IvANjY+SbBZuiSxQ== X-Received: by 2002:ac8:396f:: with SMTP id t44-v6mr23959728qtb.22.1525449588699; Fri, 04 May 2018 08:59:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Peter Maydell , "Edgar E . Iglesias" Date: Fri, 4 May 2018 12:59:05 -0300 Message-Id: <20180504155918.21287-8-f4bug@amsat.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180504155918.21287-1-f4bug@amsat.org> References: <20180504155918.21287-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:c0d::241 Subject: [Qemu-devel] [PATCH 07/20] sdcard: Constify sd_crc*()'s message argument 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: Paolo Bonzini , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Hajnoczi , 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/sd/sd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 801ddc2cb5..3708ec1d72 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -237,11 +237,11 @@ static const int sd_cmd_class[SDMMC_CMD_MAX] =3D { 7, 7, 10, 7, 9, 9, 9, 8, 8, 10, 8, 8, 8, 8, 8, 8, }; =20 -static uint8_t sd_crc7(void *message, size_t width) +static uint8_t sd_crc7(const void *message, size_t width) { int i, bit; uint8_t shift_reg =3D 0x00; - uint8_t *msg =3D (uint8_t *) message; + const uint8_t *msg =3D (const uint8_t *)message; =20 for (i =3D 0; i < width; i ++, msg ++) for (bit =3D 7; bit >=3D 0; bit --) { @@ -253,11 +253,11 @@ static uint8_t sd_crc7(void *message, size_t width) return shift_reg; } =20 -static uint16_t sd_crc16(void *message, size_t width) +static uint16_t sd_crc16(const void *message, size_t width) { int i, bit; uint16_t shift_reg =3D 0x0000; - uint16_t *msg =3D (uint16_t *) message; + const uint16_t *msg =3D (const uint16_t *)message; width <<=3D 1; =20 for (i =3D 0; i < width; i ++, msg ++) --=20 2.17.0