public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server v2 1/8] critic: code style: cpu config: unpack @_ first in resolve_cpu_flags()
Date: Fri,  7 Nov 2025 15:43:39 +0100	[thread overview]
Message-ID: <20251107144429.126790-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20251107144429.126790-1-f.ebner@proxmox.com>

Also in preparation to add more code at the beginning of the function,
which would reduce readability further without this style fix.

Suggested-by: Daniel Kral <d.kral@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

New in v2.

 src/PVE/QemuServer/CPUConfig.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PVE/QemuServer/CPUConfig.pm b/src/PVE/QemuServer/CPUConfig.pm
index e72bdf2f..6d5a4237 100644
--- a/src/PVE/QemuServer/CPUConfig.pm
+++ b/src/PVE/QemuServer/CPUConfig.pm
@@ -534,9 +534,11 @@ sub print_cpu_device {
 #     ...
 # }
 sub resolve_cpu_flags {
+    my @flag_hashes = @_;
+
     my $flags = {};
 
-    for my $hash (@_) {
+    for my $hash (@flag_hashes) {
         for my $flag_name (keys %$hash) {
             my $flag = $hash->{$flag_name};
             my $old_flag = $flags->{$flag_name};
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2025-11-07 14:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 14:43 [pve-devel] [PATCH-SERIES qemu-server/manager v2 0/8] VM CPU flags: introduce vendor-agnostic 'nested-virt' CPU flag Fiona Ebner
2025-11-07 14:43 ` Fiona Ebner [this message]
2025-11-07 14:43 ` [pve-devel] [PATCH qemu-server v2 2/8] api: add endpoint for querying available cpu flags Fiona Ebner
2025-11-07 14:43 ` [pve-devel] [PATCH qemu-server v2 3/8] cpu config: introduce is_abstracted() helper Fiona Ebner
2025-11-07 14:43 ` [pve-devel] [PATCH qemu-server v2 4/8] cpu config: introduce vendor-agnostic 'nested-virt' CPU flag Fiona Ebner
2025-11-07 14:43 ` [pve-devel] [PATCH manager v2 5/8] api: capabilities: register module for VM CPU flags Fiona Ebner
2025-11-07 14:43 ` [pve-devel] [PATCH manager v2 6/8] ui: cpu flag selector: code style: use 'let' for declarations Fiona Ebner
2025-11-07 14:43 ` [pve-devel] [PATCH manager v2 7/8] ui: cpu flag selector: use simpler method to get all records of the store Fiona Ebner
2025-11-07 14:43 ` [pve-devel] [PATCH manager v2 8/8] ui: cpu flag selector: query CPU flag list via API Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251107144429.126790-2-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal