From nobody Tue Nov 26 10:38:27 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1707988610; cv=none; d=zohomail.com; s=zohoarc; b=Vq4QnCdeFfq6XBC/APRmXHVq8OAr915C+m/XNVYC8A3G3AcR8CFqjpIPbotYz8YEkQ7TNXmT60MjGkPgJAmqT6f9cH8vSz2fOpmIXO6yWgeJu4kTjeGIi6hzON8iHUE/dsE4VjDbV5sgQvZA2+ZFsS37MtrUkirFDkgFA0sRkIk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707988610; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+JQ0Ev2JlvyvJ4uulG5JSOM5ldpWV0pOJnl05fuaHW0=; b=JB0Q3g6n7Nmt3JfDez3+xlJx7UoPPaGOSJKSBYrOriPIft4H2X6PrhFFEwSo8baAZnK8s265gFy7By1wY52Ey4Ih7q6HQJnDoKN8ZNwJREMvKgYes4ORBosS3b33zYeDN7MI1Gcj1f8jUZmcpEEbegr0xYmTfA0l8RPXM/DJZUI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1707988610377408.45742297235813; Thu, 15 Feb 2024 01:16:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raXqo-0002OK-Bd; Thu, 15 Feb 2024 04:16:14 -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 1raXqn-0002Lv-FF for qemu-devel@nongnu.org; Thu, 15 Feb 2024 04:16:13 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raXqj-0001XS-5m for qemu-devel@nongnu.org; Thu, 15 Feb 2024 04:16:13 -0500 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-55a035669d5so899571a12.2 for ; Thu, 15 Feb 2024 01:16:08 -0800 (PST) Received: from localhost.localdomain (adsl-101.109.242.224.tellas.gr. [109.242.224.101]) by smtp.gmail.com with ESMTPSA id zh14-20020a170906880e00b00a3d35bccdf0sm343307ejb.139.2024.02.15.01.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 01:16:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707988567; x=1708593367; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+JQ0Ev2JlvyvJ4uulG5JSOM5ldpWV0pOJnl05fuaHW0=; b=XiENvnyJv0SbOHXXCfFSP5b4PYZzSCf3JEtCsk2l3e62dZO3kkVXvgTnvsNB+hYp0d mCdeooMoG/i1PpYREgHW0KUhHBGnLTO828QMj2hE/YU4eDiee9ZpcX4kEaIrtso1Y6qD nV5W3lk3K97fOwQiO9TFzjtgi9haPbVsGUfO+dxn02jTotXNZHbkQCCYR0PlHOjFsidC VqX1SkPi+aww4czRTywPYEYx9CyLGSYE/BG1mmQPfJA920fWmKCq2wxrNZLGJZwmdwdy +YWFns7dMMQ7WMzPnUce24gS5tjaI0wzd/4suHiXHuxCKmswJk0SPYldBNyBC5BEl0sb ksTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707988567; x=1708593367; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+JQ0Ev2JlvyvJ4uulG5JSOM5ldpWV0pOJnl05fuaHW0=; b=LeyLdgZI+elVDuUDyKvZpeEMjIRJxQ+MZrbIjJ/zrXO/twfc6VhZdru+VabLFgi6eF VWe9wryxF+I+IhTqalFkTt7VN28OaPrAlPaK6l+jlHIlcHbKBYF+uJ774MJu78sbig9x 0Hf4qAxNwK3qTI3NV1XK+Nl/7PcZEVx5hAYBAYmoaiQS60WxlbbG3KDreonVB7vcLhkA vt3NeiY6VVyCxTSZqBQ57CCMpo95sp8Ilbnuma+GgG8eokQ7WkZF8IZVT/KDAYTStUJw OSRsAiMpeZcb9bDmi+6dTIoH3RIvZ/ivq6BAXWxUFvCxfhuTOm823LRzdQDj0X5lAOYD 6GBg== X-Gm-Message-State: AOJu0YzH23C2Bte1W/+4PHR1miRinTkGMDIovKjK62nNQrvitsqy0DTz WfC+SnPJf3gkw2Mm1FzDQYvI4cXOVxjB/67f9ZYdBJb7MYK7A8F+LWTauJX7ThQUcPI3lzrj0gk HNf8= X-Google-Smtp-Source: AGHT+IF3HL0VxeUHH2AOcyoLXxR3uEMml5BJU2vIPnwsssZCC9hOe/j2qBPxYwdTPIQ/fcRb09AJFg== X-Received: by 2002:a17:906:4544:b0:a3d:abd1:7035 with SMTP id s4-20020a170906454400b00a3dabd17035mr94260ejq.9.1707988566841; Thu, 15 Feb 2024 01:16:06 -0800 (PST) From: Manos Pitsidianakis To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Michael Tokarev , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini , Peter Xu , David Hildenbrand Subject: [PATCH] system/physmem: remove redundant arg reassignment Date: Thu, 15 Feb 2024 11:15:06 +0200 Message-Id: <20240215091506.1932251-1-manos.pitsidianakis@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=manos.pitsidianakis@linaro.org; helo=mail-ed1-x52e.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, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1707988612176100003 Arguments `ram_block` are reassigned to local declarations `block` without further use. Remove re-assignment to reduce noise. Signed-off-by: Manos Pitsidianakis Reviewed-by: David Hildenbrand Reviewed-by: Michael Tokarev Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- system/physmem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/system/physmem.c b/system/physmem.c index 5e66d9ae36..d4c3bfac65 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -2154,10 +2154,8 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t leng= th) * * Called within RCU critical section. */ -void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr) +void *qemu_map_ram_ptr(RAMBlock *block, ram_addr_t addr) { - RAMBlock *block =3D ram_block; - if (block =3D=3D NULL) { block =3D qemu_get_ram_block(addr); addr -=3D block->offset; @@ -2182,10 +2180,9 @@ void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr= _t addr) * * Called within RCU critical section. */ -static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, +static void *qemu_ram_ptr_length(RAMBlock *block, ram_addr_t addr, hwaddr *size, bool lock) { - RAMBlock *block =3D ram_block; if (*size =3D=3D 0) { return NULL; } base-commit: 5767815218efd3cbfd409505ed824d5f356044ae --=20 =CE=B3=CE=B1=E1=BF=96=CE=B1 =CF=80=CF=85=CF=81=CE=AF =CE=BC=CE=B9=CF=87=CE= =B8=CE=AE=CF=84=CF=89