From nobody Sun Nov 9 17:49:36 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551098064586647.7058237538604; Mon, 25 Feb 2019 04:34:24 -0800 (PST) Received: from localhost ([127.0.0.1]:36279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyFSf-0006Hs-Ge for importer@patchew.org; Mon, 25 Feb 2019 07:34:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyFQQ-00056q-Sd for qemu-devel@nongnu.org; Mon, 25 Feb 2019 07:32:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyFQI-00057q-Cc for qemu-devel@nongnu.org; Mon, 25 Feb 2019 07:31:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38100) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyFQG-000546-K0 for qemu-devel@nongnu.org; Mon, 25 Feb 2019 07:31:52 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BA60283F3F; Mon, 25 Feb 2019 12:31:49 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 952FB5D71A; Mon, 25 Feb 2019 12:31:47 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Date: Mon, 25 Feb 2019 12:31:04 +0000 Message-Id: <20190225123111.30363-5-berrange@redhat.com> In-Reply-To: <20190225123111.30363-1-berrange@redhat.com> References: <20190225123111.30363-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 25 Feb 2019 12:31:49 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 04/11] hw/usb: fix const-ness for string params in MTP driver 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: Michael Roth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Markus Armbruster , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Andreas=20F=C3=A4rber?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Various functions accepting 'char *' string parameters were missing 'const' qualifiers. Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Daniel P. Berrang=C3=A9 --- hw/usb/dev-mtp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index f0c52a476a..169ee50c02 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -383,7 +383,7 @@ static const USBDesc desc =3D { /* -----------------------------------------------------------------------= */ =20 static MTPObject *usb_mtp_object_alloc(MTPState *s, uint32_t handle, - MTPObject *parent, char *name) + MTPObject *parent, const char *name) { MTPObject *o =3D g_new0(MTPObject, 1); =20 @@ -465,7 +465,7 @@ static MTPObject *usb_mtp_object_lookup(MTPState *s, ui= nt32_t handle) } =20 static MTPObject *usb_mtp_add_child(MTPState *s, MTPObject *o, - char *name) + const char *name) { MTPObject *child =3D usb_mtp_object_alloc(s, s->next_handle++, o, name); @@ -484,7 +484,7 @@ static MTPObject *usb_mtp_add_child(MTPState *s, MTPObj= ect *o, } =20 static MTPObject *usb_mtp_object_lookup_name(MTPObject *parent, - char *name, int len) + const char *name, int len) { MTPObject *iter; =20 @@ -651,7 +651,7 @@ static void usb_mtp_inotify_cleanup(MTPState *s) } } =20 -static int usb_mtp_add_watch(int inotifyfd, char *path) +static int usb_mtp_add_watch(int inotifyfd, const char *path) { uint32_t mask =3D IN_CREATE | IN_DELETE | IN_MODIFY; =20 --=20 2.20.1