From nobody Wed Nov 5 12:43:56 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; 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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1534424828372677.7601185008813; Thu, 16 Aug 2018 06:07:08 -0700 (PDT) Received: from localhost ([::1]:55488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqHzX-0000Tz-4N for importer@patchew.org; Thu, 16 Aug 2018 09:07:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqHuC-0003Rd-RB for qemu-devel@nongnu.org; Thu, 16 Aug 2018 09:01:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqHu6-0001To-Re for qemu-devel@nongnu.org; Thu, 16 Aug 2018 09:01:36 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37462 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fqHu6-0001TD-L6 for qemu-devel@nongnu.org; Thu, 16 Aug 2018 09:01:30 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4AD717A7EE; Thu, 16 Aug 2018 13:01:30 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-135.ams2.redhat.com [10.36.117.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 829522156712; Thu, 16 Aug 2018 13:01:28 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Date: Thu, 16 Aug 2018 14:01:11 +0100 Message-Id: <20180816130118.31841-5-berrange@redhat.com> In-Reply-To: <20180816130118.31841-1-berrange@redhat.com> References: <20180816130118.31841-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 16 Aug 2018 13:01:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 16 Aug 2018 13:01:30 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'berrange@redhat.com' RCPT:'' Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v4 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: Markus Armbruster , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?UTF-8?q?Andreas=20F=C3=A4rber?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Various functions accepting 'char *' string parameters were missing 'const' qualifiers. 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 80f88e40fa..d5f570fb56 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -368,7 +368,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 @@ -450,7 +450,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); @@ -469,7 +469,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 @@ -636,7 +636,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.17.1