From patchwork Fri Dec 13 13:33:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 850123 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp1502509wry; Fri, 13 Dec 2024 05:35:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUShPI+F+o/PxCQOa76p5KaKDAjablJaa+cNsqWuyFcmR7UAu5vVXMQ6R6mztbRQWeqYZ5QoQ==@linaro.org X-Google-Smtp-Source: AGHT+IETnNYEwova2DOAg+ZVJIKStt6Q2kj2LcGpt/5d13epKJ89fvS5dBBp93aaLbHl9iz1x+zg X-Received: by 2002:a05:620a:6843:b0:7b6:cdd4:bde1 with SMTP id af79cd13be357-7b6fbeca637mr478508585a.1.1734096900853; Fri, 13 Dec 2024 05:35:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734096900; cv=none; d=google.com; s=arc-20240605; b=VQ2EpHF3NZo5dGJ3BWk0hftHCc+ZCgeQVq2UaIxQCYtby/McNhPBWTfwvAjxkMmtTt r7d5JVR8Lsfvnt/TKDKBvKeULPzj8AlPbv8rExCZ6Y8r+JxPjuGxpQzi9tiVuBTOWH7Y wQe3t0G+wp0TxRZlOQjifLFgT9TlwJrx+cj7i4n9b5QwlGOmvqnQR5cJhHnbiFgkfM+v G88kFdM3xZWljfbyBBLrb5vBgX1WSis2wrGrUkfvsWvNTQcR1E43nFeeM8Dj9vlZnkTW nwL6jTu6jwO9huyv6PuqlHH+MI4OaKiMeIY4f//iK7KmgF0QWv5z0PH78zZl/WhXUf+y o9XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WlswgE/eUO5zmvvMPBofBLx3raLRd7GBRUggU9AjFY8=; fh=5/bEEfneXpYiCSLu1RRtIdWOVpk1SgQYYFlk2zFRZHo=; b=Q68Tf/EUuuwnLjCEaC+sHUi1BktQ43NFx15NJ8Ufbf/4FuwBzawrndCXOoAB3Z31IJ Ok8+NzGTpmmhhgGO9l0/IFT4TIL0TMEVvaWgakW9jkZuyBL/jWBp37cPhl8JA0bxPJHE yQ4QKmdpxcgW88kgcuZDbo5lJrYssWNIRqn6aZeOuArIVjddpiBeF7FuPq0mKJj6UqY7 uOfbGCugujxzkln5Six0A4VZzyWQS2m804afa+VZYYclDkzZ69ZocFmlEJzm7kClAxRh OreiC+dBQoKI4ki/MwzzT5yobEMJ79/WZ9qMPKRoydL2rukowec8Njk39Zaj3ev7OJvA 9VmQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ijtpxrzu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b6d9b292basi1040370785a.521.2024.12.13.05.35.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Dec 2024 05:35:00 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ijtpxrzu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM5oQ-0005IN-H8; Fri, 13 Dec 2024 08:34:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tM5ny-0005AL-7i for qemu-devel@nongnu.org; Fri, 13 Dec 2024 08:34:11 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tM5nv-00014y-Cm for qemu-devel@nongnu.org; Fri, 13 Dec 2024 08:34:05 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-385deda28b3so1299389f8f.0 for ; Fri, 13 Dec 2024 05:34:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734096840; x=1734701640; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WlswgE/eUO5zmvvMPBofBLx3raLRd7GBRUggU9AjFY8=; b=IjtpxrzuxdaEX3fkeS7JbkX83ZVBNxAQSPxvsRLm3MpaXfaGj/BRo6fmcH58vSWHm5 qcN4Xj82oIKb/0kZUjMj0KfzE7u3jYmjlQ9UcTjgJoRLyrLQN5koQd1Pjit6ZsIyoqDr FCjZzw/NG32/NDNev+jEvoU2DFXoT4dQH5bGRmW7V+yzVbn3/kWjgyyDf8PPlUrUw2bA 8DoPgMutmrWQ1ydQ+uPBiF6+R9IM5v1kGd1E+gbaNx1kFiRZii+eUswfcU30aINvloul d6vOpDgp5wLzXM4UriXKXmT9lJk5Xn6z/ttpkOc9jF8Z8VDk+mvARFmn9tZY1WtShKW8 g02Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734096840; x=1734701640; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WlswgE/eUO5zmvvMPBofBLx3raLRd7GBRUggU9AjFY8=; b=Q7EyP+FUfQafPiWvfZIYBv63h0KSNxy6ZAdafcd5CVDzI+Zzhhp3m2si98VCBZjHEV DSZCnW6RQDvq6Xlm4rtDmgz/0B3qXazsQ9U1g+yqsErt00V9jFvJoiJ5dsITVvx+sp82 Oy5nNBe0NMLTO/Hpccn/gLnBRvI5Ok3ADSNDSQ0qHxXb1epB8ya5KfPBuXQ7/TWgEncU Du7Gt09wDT2l7edTDKd10owGZFS3Eo3aOWQv6eQT8JJQWkSGNGddBckPtYigyKaoTKho RkRP3QxbPhINjgSlijQPmXuG951n6essyFWBTMw7nWFam/C8aE3R6QvbWyOuBMahVdhv RAgA== X-Gm-Message-State: AOJu0YyoRoUhHGP+Hpt7ywRZi/mIukwWIHBZVud5qxgxj2ze2DrOLwJN /foGtR7Id8xxA9W6NVE+xDyNnFnMtRJr0rxuK1ZA9uXMluSZ4qowJdqD29e6ljGzFQnBfyFvKPT j X-Gm-Gg: ASbGncveEDiXFyRInQE775ymF/vLFeMKF87kXb1pkU9Nm37YywZVCr4ffYXtoAO9+Ge aJqae2to2cW9YdzvXyK4a52S9M2G7IFo76XqtjO2dYJJVj8rPIjaaFe9XmxH65G5mp/f5GlgBr+ HSXgdFRm0kCciC/3p3jZDgt+zlQsVdVLPtK3WXH/I439+OYc5C+KgDCL6VLg0bYzQ2UeQRV57KT YtZx2xWwPB7dloiFQx5cZV7tHE1wydEhJDUIxJRIM8C8ZkRhR/0n9i2tJaeCNwQ8wxb40FFbTJT AzuSMGVLpqZyMHlZUng4UAfih4BHb7+aM7sP X-Received: by 2002:a05:6000:4616:b0:385:dedb:a148 with SMTP id ffacd0b85a97d-3888e0ac4f4mr1863536f8f.46.1734096839885; Fri, 13 Dec 2024 05:33:59 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436255531dasm48965815e9.8.2024.12.13.05.33.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Dec 2024 05:33:58 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Gerd Hoffmann , =?utf-8?q?Daniel?= =?utf-8?q?_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= Subject: [PATCH v2 1/7] hw/nvram/fw_cfg: Rename fw_cfg_add_[file]_from_generator() Date: Fri, 13 Dec 2024 14:33:46 +0100 Message-ID: <20241213133352.10915-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241213133352.10915-1-philmd@linaro.org> References: <20241213133352.10915-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org fw_cfg_add_from_generator() is adding a 'file' entry, so rename as fw_cfg_add_file_from_generator() for clarity. Besides, we might introduce generators for other entry types. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- include/hw/nvram/fw_cfg.h | 6 +++--- hw/nvram/fw_cfg.c | 4 ++-- system/vl.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h index fa426776192..14e68966c59 100644 --- a/include/hw/nvram/fw_cfg.h +++ b/include/hw/nvram/fw_cfg.h @@ -291,7 +291,7 @@ void *fw_cfg_modify_file(FWCfgState *s, const char *filename, void *data, size_t len); /** - * fw_cfg_add_from_generator: + * fw_cfg_add_file_from_generator: * @s: fw_cfg device being modified * @filename: name of new fw_cfg file item * @gen_id: name of object implementing FW_CFG_DATA_GENERATOR interface @@ -307,8 +307,8 @@ void *fw_cfg_modify_file(FWCfgState *s, const char *filename, void *data, * * Returns: %true on success, %false on error. */ -bool fw_cfg_add_from_generator(FWCfgState *s, const char *filename, - const char *gen_id, Error **errp); +bool fw_cfg_add_file_from_generator(FWCfgState *s, const char *filename, + const char *gen_id, Error **errp); /** * fw_cfg_add_extra_pci_roots: diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index b644577734c..fe3b86135a7 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -1027,8 +1027,8 @@ void *fw_cfg_modify_file(FWCfgState *s, const char *filename, return NULL; } -bool fw_cfg_add_from_generator(FWCfgState *s, const char *filename, - const char *gen_id, Error **errp) +bool fw_cfg_add_file_from_generator(FWCfgState *s, const char *filename, + const char *gen_id, Error **errp) { FWCfgDataGeneratorClass *klass; GByteArray *array; diff --git a/system/vl.c b/system/vl.c index 2f855d83fbb..f103532a9a1 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1184,7 +1184,7 @@ static int parse_fw_cfg(void *opaque, QemuOpts *opts, Error **errp) size = strlen(str); /* NUL terminator NOT included in fw_cfg blob */ buf = g_memdup(str, size); } else if (nonempty_str(gen_id)) { - if (!fw_cfg_add_from_generator(fw_cfg, name, gen_id, errp)) { + if (!fw_cfg_add_file_from_generator(fw_cfg, name, gen_id, errp)) { return -1; } return 0;