From nobody Thu Nov 13 21:53:35 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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 ARC-Seal: i=1; a=rsa-sha256; t=1583370364; cv=none; d=zohomail.com; s=zohoarc; b=hkxidxXYaEn+F9XwqufJnqLA2xc8+CdetQfjKdNSaR87EP407A2mZgF//J9PmHtmezuU/kI2IWk1IH3pX33pdE6Znhu3sooVNNKEw9uyyQ0hFN/yJPtVHvr7pZVHBYvgWA694C3YNnqm6vHyfWfzTs/nMxAHFs2AZO4hxn+fIz0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583370364; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=G7z8C3H465JpVsN6Yw+fEi9EeJJjIsNf/qW73pA0nsU=; b=TQsPz0I4jEvHBuJb62AOmxCrJ/7GgIiJpF3MVwhZndzsppEn4XEGMqQbzVDrog/LZm8OGvcvbZ8Vc8DYOlh+E6g1QltAlWl46c2OSj7xBX82EXkZ3KsEiL8nyzFWuByjtoEZsJTbwExTo+UK8Ule7m6i0k5c3XG9dbw+byoGBoo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1583370364556852.2800149444683; Wed, 4 Mar 2020 17:06:04 -0800 (PST) Received: from localhost ([::1]:41998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9exe-0006Ab-SP for importer@patchew.org; Wed, 04 Mar 2020 20:06:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39473) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9ewe-0004A7-TQ for qemu-devel@nongnu.org; Wed, 04 Mar 2020 20:05:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9ewd-0005L2-O6 for qemu-devel@nongnu.org; Wed, 04 Mar 2020 20:05:00 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:21241 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j9ewd-0005Km-Ky for qemu-devel@nongnu.org; Wed, 04 Mar 2020 20:04:59 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-33-U59JyTFEM_idYbz-pvR4zw-1; Wed, 04 Mar 2020 20:04:55 -0500 Received: by mail-wr1-f69.google.com with SMTP id d7so1641176wrr.0 for ; Wed, 04 Mar 2020 17:04:55 -0800 (PST) Received: from localhost.localdomain (47.red-88-21-205.staticip.rima-tde.net. [88.21.205.47]) by smtp.gmail.com with ESMTPSA id c23sm4561228wme.39.2020.03.04.17.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 17:04:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583370299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G7z8C3H465JpVsN6Yw+fEi9EeJJjIsNf/qW73pA0nsU=; b=JRTeVE8X0F2062/RDKe1zI4YQw7iR2tV9EF7lfvvg+WHj731ipMM+fzZcK9TZGQA49W+IH of2CrKOkLDOIiCpksPr/+DApUwUPZIEmSSN3MyrRzZWbfDHQg1BsfInLUMpES9kbbDW2nN MJgGcbZOdfPKYYripNNjwEkTinM6KLw= X-MC-Unique: U59JyTFEM_idYbz-pvR4zw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mERLJkA6KL9WHqzO6Je/w9Mt4U4fyGT4//wl15kUfLY=; b=VFo6+gzHubDstvX1N2wN/dyDcN2I+x2MQpZFmrS8Q/mleA7Y7spUrYJgjZieM5tcp8 czee8HKjooPRN11PMiTu/bFWhXMCJSLvc9o5o7lFRglqfalDCvmXpjOVxoQXRs279KDy ikTELU455NSWJaMxthk630oXfvKPsWsJDcDSX8Ct4qZRvQGNK99j0v/oJZ8ii/mlfLdw RrEdJKSA6oZiOKlTfdgoqmTHuF34nokO2D/w2VYlMkMst9syUs98zKCAyma4B/3bujNP 9P1I7gQbtspdxqym/Xsk6qX1vK6yBLidIXs4f+gePR63euyJ198d/VqilFrVZbWk4iQa UPbw== X-Gm-Message-State: ANhLgQ0RIKTVrrVzvNEcju8Bc1+lyNS7/Y6LpnJ8uI+QjWYDj7wDdcbZ yEY8v0RttmZxGSQvGujhif65Lx1VfCw6x9tn81etUX+KBTchNRpzywrp3vUid0yQQVvEbbsSlv6 cm1iSyE2sOqPp6SE= X-Received: by 2002:adf:80cb:: with SMTP id 69mr6444513wrl.320.1583370294397; Wed, 04 Mar 2020 17:04:54 -0800 (PST) X-Google-Smtp-Source: ADFU+vvJ90DV5759BkuoDYTgS2LzEz7rlCGQ76Yc2MdMX8Uuwxeu1ZXbzStpDEg3Jd8tWL72k4I3gw== X-Received: by 2002:adf:80cb:: with SMTP id 69mr6444498wrl.320.1583370294189; Wed, 04 Mar 2020 17:04:54 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/3] hw/net/e1000: Add readops/writeops typedefs Date: Thu, 5 Mar 2020 02:04:44 +0100 Message-Id: <20200305010446.17029-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200305010446.17029-1-philmd@redhat.com> References: <20200305010446.17029-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dmitry Fleytman , qemu-trivial@nongnu.org, Jason Wang , Christian Schoenebeck , Greg Kurz , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Express the macreg[] arrays using typedefs. No logical changes introduced here. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Reviewed-by: Dmitry Fleytman Reviewed-by: Stefano Garzarella --- hw/net/e1000.c | 6 ++++-- hw/net/e1000e_core.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 0b833d5a15..972d9b5083 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1150,7 +1150,8 @@ set_ims(E1000State *s, int index, uint32_t val) } =20 #define getreg(x) [x] =3D mac_readreg -static uint32_t (*macreg_readops[])(E1000State *, int) =3D { +typedef uint32_t (*readops)(E1000State *, int); +static readops macreg_readops[] =3D { getreg(PBA), getreg(RCTL), getreg(TDH), getreg(TXDCTL), getreg(WUFC), getreg(TDT), getreg(CTRL), getreg(LEDCTL), getreg(MANC), getreg(MDIC), getreg(SWSM), getreg(STATUS), @@ -1205,7 +1206,8 @@ static uint32_t (*macreg_readops[])(E1000State *, int= ) =3D { enum { NREADOPS =3D ARRAY_SIZE(macreg_readops) }; =20 #define putreg(x) [x] =3D mac_writereg -static void (*macreg_writeops[])(E1000State *, int, uint32_t) =3D { +typedef void (*writeops)(E1000State *, int, uint32_t); +static writeops macreg_writeops[] =3D { putreg(PBA), putreg(EERD), putreg(SWSM), putreg(WUFC), putreg(TDBAL), putreg(TDBAH), putreg(TXDCTL), putreg(RDBAH), putreg(RDBAL), putreg(LEDCTL), putreg(VET), putreg(FCRUC), diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 94ea34dca5..38bdb90114 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -2855,7 +2855,8 @@ e1000e_set_gcr(E1000ECore *core, int index, uint32_t = val) } =20 #define e1000e_getreg(x) [x] =3D e1000e_mac_readreg -static uint32_t (*e1000e_macreg_readops[])(E1000ECore *, int) =3D { +typedef uint32_t (*readops)(E1000ECore *, int); +static readops e1000e_macreg_readops[] =3D { e1000e_getreg(PBA), e1000e_getreg(WUFC), e1000e_getreg(MANC), @@ -3061,7 +3062,8 @@ static uint32_t (*e1000e_macreg_readops[])(E1000ECore= *, int) =3D { enum { E1000E_NREADOPS =3D ARRAY_SIZE(e1000e_macreg_readops) }; =20 #define e1000e_putreg(x) [x] =3D e1000e_mac_writereg -static void (*e1000e_macreg_writeops[])(E1000ECore *, int, uint32_t) =3D { +typedef void (*writeops)(E1000ECore *, int, uint32_t); +static writeops e1000e_macreg_writeops[] =3D { e1000e_putreg(PBA), e1000e_putreg(SWSM), e1000e_putreg(WUFC), --=20 2.21.1 From nobody Thu Nov 13 21:53:35 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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 ARC-Seal: i=1; a=rsa-sha256; t=1583370450; cv=none; d=zohomail.com; s=zohoarc; b=DVAZOOo0YR/ayu1wjpG/09vJoher6hlqKaxsbYzARJDxhtV124T1eliEOTzjQ8JcCFGb0OSF7DKwA/kzvKvjiX9T5Rs02pJfsgIIjnTxhiV9jXnNg3WPoYjqekFDHDeAruIEbe3dWzSovc4SrRCPLlypuzSrANKXPWJtF+jNnsM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583370450; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fUQHY5u6EmUZcs/PU9+tDJ55yHeFQYfslboPGYA34ns=; b=JTH4Ufz9BCxwcFpdpHOGDK+4Tu27DUcvjEHvARWKG4ec4pCGbHKrkKUmy77BInO2XvvdzToEeVgbVqORT08D9Gs38Igco04V4tfWQIUHkmSJw2mdoTNExzdos7O0/iMwZ2MHQ+u1tprsHm9HIO8ohs2obcC99EfXqiqD3EjVWgA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1583370450872316.98609436161996; Wed, 4 Mar 2020 17:07:30 -0800 (PST) Received: from localhost ([::1]:42028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9ez3-0008K5-Qq for importer@patchew.org; Wed, 04 Mar 2020 20:07:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39499) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9ewi-0004Fs-HD for qemu-devel@nongnu.org; Wed, 04 Mar 2020 20:05:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9ewh-0005Ru-Ar for qemu-devel@nongnu.org; Wed, 04 Mar 2020 20:05:04 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:27096 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j9ewh-0005Ra-74 for qemu-devel@nongnu.org; Wed, 04 Mar 2020 20:05:03 -0500 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-396-rg6fAo8ZObuf3AErZAN0mg-1; Wed, 04 Mar 2020 20:05:01 -0500 Received: by mail-wr1-f70.google.com with SMTP id q18so1629918wrw.5 for ; Wed, 04 Mar 2020 17:05:01 -0800 (PST) Received: from localhost.localdomain (47.red-88-21-205.staticip.rima-tde.net. [88.21.205.47]) by smtp.gmail.com with ESMTPSA id p17sm39232183wre.89.2020.03.04.17.04.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 17:04:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583370302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fUQHY5u6EmUZcs/PU9+tDJ55yHeFQYfslboPGYA34ns=; b=KdNLQCu96CatU9N1m980YNtcqOlE3U+sk7Xl3YLhsLeiVZOvNscyZl+xMW11TEwm8yyUIh +ug1YQcme/qD0lpigwKc/aDL27z+hXAajoToK4rGUDgd0ZrM4a7CYZetNtMHTKOK8KKQtw bQAqFpKE49BWd+e1IOshVg/5NFMcNyM= X-MC-Unique: rg6fAo8ZObuf3AErZAN0mg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LqA3yPl/c3LrUeLcESiAMq8nwyp7UScHu+TeSWu0joQ=; b=l9zhCiDhwov1997NE35fj3lzYlKpNjP9YN8/FbCaipFhKoFeg+xIfL2iDG75NMgVCQ fwh66mhf3cCrLpZZfLbsIlNu0B8AYW9YiytEAzTrAN2Gt2v8N5z1nyKpRydn0YmSuuld 0734OJ+FiR1a/BoYVLTv9PF/dKRtSpnzIULUG92ttz5sMLZOvPY+w8wdqTWguGdTT1oK yX4hgibZO5RVidvwya1ySYWQFtm5eIcbg2ScjgPC9EbRDSm7ZIdbdHWcSp6InL2PBZlx yXoxOas2VMTjOFfiusaZsxd+iZ8uZahs8bflKr0zDZH3w69a8FdAkwhaU39LfmZyAZoA Xp2A== X-Gm-Message-State: ANhLgQ18/ZPpSayXOMScxhqNBujeO8Fx6pE+W0twpkR9sjgpbHnduyfL 92zcAIUZiyBphztZjGVrpQ5sgMkKvxaVcWy1TsgSunnMcajX71seWqiXmk4huao3E1ohWAEkppN nGrgU+7vsHY+VKdA= X-Received: by 2002:a1c:2504:: with SMTP id l4mr6259424wml.72.1583370299729; Wed, 04 Mar 2020 17:04:59 -0800 (PST) X-Google-Smtp-Source: ADFU+vsStLSEQ4P3ixqLsg5jOfE+knNZffWOwnVpTYXDptRIv35kd+x19v2hzB4MxmdF/78jFpo+5g== X-Received: by 2002:a1c:2504:: with SMTP id l4mr6259406wml.72.1583370299545; Wed, 04 Mar 2020 17:04:59 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/3] hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data Date: Thu, 5 Mar 2020 02:04:45 +0100 Message-Id: <20200305010446.17029-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200305010446.17029-1-philmd@redhat.com> References: <20200305010446.17029-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dmitry Fleytman , qemu-trivial@nongnu.org, Jason Wang , Christian Schoenebeck , Greg Kurz , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Each array consumes 256KiB of .data. As we do not reassign entries, we can move it to the .rodata section, and save a total of 1MiB of .data (size reported on x86_64 host). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Reviewed-by: Dmitry Fleytman Reviewed-by: Stefano Garzarella --- hw/net/e1000.c | 4 ++-- hw/net/e1000e_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 972d9b5083..9233248c9a 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1151,7 +1151,7 @@ set_ims(E1000State *s, int index, uint32_t val) =20 #define getreg(x) [x] =3D mac_readreg typedef uint32_t (*readops)(E1000State *, int); -static readops macreg_readops[] =3D { +static const readops macreg_readops[] =3D { getreg(PBA), getreg(RCTL), getreg(TDH), getreg(TXDCTL), getreg(WUFC), getreg(TDT), getreg(CTRL), getreg(LEDCTL), getreg(MANC), getreg(MDIC), getreg(SWSM), getreg(STATUS), @@ -1207,7 +1207,7 @@ enum { NREADOPS =3D ARRAY_SIZE(macreg_readops) }; =20 #define putreg(x) [x] =3D mac_writereg typedef void (*writeops)(E1000State *, int, uint32_t); -static writeops macreg_writeops[] =3D { +static const writeops macreg_writeops[] =3D { putreg(PBA), putreg(EERD), putreg(SWSM), putreg(WUFC), putreg(TDBAL), putreg(TDBAH), putreg(TXDCTL), putreg(RDBAH), putreg(RDBAL), putreg(LEDCTL), putreg(VET), putreg(FCRUC), diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 38bdb90114..df957e0c1a 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -2856,7 +2856,7 @@ e1000e_set_gcr(E1000ECore *core, int index, uint32_t = val) =20 #define e1000e_getreg(x) [x] =3D e1000e_mac_readreg typedef uint32_t (*readops)(E1000ECore *, int); -static readops e1000e_macreg_readops[] =3D { +static const readops e1000e_macreg_readops[] =3D { e1000e_getreg(PBA), e1000e_getreg(WUFC), e1000e_getreg(MANC), @@ -3063,7 +3063,7 @@ enum { E1000E_NREADOPS =3D ARRAY_SIZE(e1000e_macreg_r= eadops) }; =20 #define e1000e_putreg(x) [x] =3D e1000e_mac_writereg typedef void (*writeops)(E1000ECore *, int, uint32_t); -static writeops e1000e_macreg_writeops[] =3D { +static const writeops e1000e_macreg_writeops[] =3D { e1000e_putreg(PBA), e1000e_putreg(SWSM), e1000e_putreg(WUFC), --=20 2.21.1 From nobody Thu Nov 13 21:53:35 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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 ARC-Seal: i=1; a=rsa-sha256; t=1583370389; cv=none; d=zohomail.com; s=zohoarc; b=SFK8ViectQTIWvJ2V5Bvxp7hKdnc1Uo92HxfbNHctvE+Nb7Lo59bTWZAyIqkk69s/fBv9M3LQbX5Jmkx47+dBfvVegvXqvEl59uRsKMGb9v+cztagmmNzVB1pcJ3f8N1nu+Vmd5jwtE44mVHDEpMCleyymiFBLvLTGiUs4SFzOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583370389; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9Pobed26pNltZm/I9CiNxzmUNaY+9kG51Kk6vz3G8IU=; b=YlF0iSBDRz0v5U+Llx93nn1HOStXzv7pWwHQzRwFJ8WTyn4ez/7rel1DAMObt5uH/k1Lrq4VGzUfZR6T7DKLJf2cE/mQVj1xbE42BZr/0BosAsazuL2sESvblRnVFDL5E0BGQeaAJTYOQnzsnK2xh5vJco00mUpMXp/rnnTbkpo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1583370389584791.9450309880434; Wed, 4 Mar 2020 17:06:29 -0800 (PST) Received: from localhost ([::1]:42010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9ey4-0006sE-Fm for importer@patchew.org; Wed, 04 Mar 2020 20:06:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39528) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9ewn-0004Lq-B4 for qemu-devel@nongnu.org; Wed, 04 Mar 2020 20:05:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9ewm-0005Vf-DX for qemu-devel@nongnu.org; Wed, 04 Mar 2020 20:05:09 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:56337 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j9ewm-0005VM-9y for qemu-devel@nongnu.org; Wed, 04 Mar 2020 20:05:08 -0500 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-333-lut5XvbfNH2cZBwFwl13dg-1; Wed, 04 Mar 2020 20:05:06 -0500 Received: by mail-wr1-f72.google.com with SMTP id l15so1106800wrr.21 for ; Wed, 04 Mar 2020 17:05:06 -0800 (PST) Received: from localhost.localdomain (47.red-88-21-205.staticip.rima-tde.net. [88.21.205.47]) by smtp.gmail.com with ESMTPSA id g7sm39625648wrm.72.2020.03.04.17.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 17:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583370308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9Pobed26pNltZm/I9CiNxzmUNaY+9kG51Kk6vz3G8IU=; b=WrPgRn7uIZnoaVorPNiZXX4Am3uOwT5nUdzrseNAQszgP7qt/BueZbL47iRtyTE4bfSecl iaSQZ2GQJzqg8V9Lp5WnYaaKEhxwTo3t0Kq7/L9kShmwXwdEOV4YFgCCV5G+w9lj1C71az AeaKMi0oga7wb/SSDEMVryipz5JBDuQ= X-MC-Unique: lut5XvbfNH2cZBwFwl13dg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jMnU2Ro3TeTUnU2ZUl/yMOyKuppxic5kPK7lhjxznVI=; b=Q5200ylrolOhfnxAR7Ys/9dmuHgVa2GrG+3CnxPuIFG8SKxqt2m5S7QRPwKTrpWhEY sSYvAWujY5a+61RVhYIbJaGpMujQKgEYED1HZZyEZeSb9a+hfZmJWqnQUGOiDIJgpgUM EVj/QRRf+nMnXfbv7kqNLw4j+vU/sG0oMXX+M1FngBAdmk+nxovVj9xG4CkWO5pLuwiA M8NN/l48CPS1FYIKAadH60NfInbyPIoKPkc6n0vSvgL10zNCHLrc80zbTQmXQo14RW73 3b5jnJsC3Ydebu/DFoi/dTRNRJluKli7BXScts9dwqMgabmsOjUfgjtrjEfojFZ3Dxbe /eSw== X-Gm-Message-State: ANhLgQ3eQF43c4dZLvXl1zNUqLnZwIW71tqq4q0YRaWEUBLGUJIUvaL3 URzHzQKLM7l0lR4UaWSmvDO/uX1JHpjXMCaDXfd7Z31/ushC1ec0KQ9obeuqhxB+fGE8CWPH8Yw WrTCJjQwEMtOEBT8= X-Received: by 2002:a1c:488b:: with SMTP id v133mr5910586wma.159.1583370304860; Wed, 04 Mar 2020 17:05:04 -0800 (PST) X-Google-Smtp-Source: ADFU+vsACmAuVe5lYfeAoDO8kBmBnjPUB2CXcZOhSjuKqXRx0ACmPOcBDdZJM9Oi+/8DUXp8ycY47Q== X-Received: by 2002:a1c:488b:: with SMTP id v133mr5910560wma.159.1583370304662; Wed, 04 Mar 2020 17:05:04 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/3] virtfs-proxy-helper: Make the helper_opts[] array const Date: Thu, 5 Mar 2020 02:04:46 +0100 Message-Id: <20200305010446.17029-4-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200305010446.17029-1-philmd@redhat.com> References: <20200305010446.17029-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dmitry Fleytman , qemu-trivial@nongnu.org, Jason Wang , Christian Schoenebeck , Greg Kurz , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Reduce a bit the memory footprint by making the helper_opts[] array const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Greg Kurz Acked-by: Paolo Bonzini Reviewed-by: Stefano Garzarella --- fsdev/virtfs-proxy-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index aa1ab2590d..de061a8a0e 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@ -43,7 +43,7 @@ #define BTRFS_SUPER_MAGIC 0x9123683E #endif =20 -static struct option helper_opts[] =3D { +static const struct option helper_opts[] =3D { {"fd", required_argument, NULL, 'f'}, {"path", required_argument, NULL, 'p'}, {"nodaemon", no_argument, NULL, 'n'}, --=20 2.21.1