From patchwork Wed Nov 1 14:04:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Huang X-Patchwork-Id: 1857969 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=smartx-com.20230601.gappssmtp.com header.i=@smartx-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=HcDb6wcu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SL83w3lXbz1yQ6 for ; Thu, 2 Nov 2023 01:08:12 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyBrr-0006V2-Hb; Wed, 01 Nov 2023 10:06:47 -0400 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 1qyBrp-0006UV-CO for qemu-devel@nongnu.org; Wed, 01 Nov 2023 10:06:45 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyBro-0004o4-05 for qemu-devel@nongnu.org; Wed, 01 Nov 2023 10:06:45 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1cc58219376so27546095ad.1 for ; Wed, 01 Nov 2023 07:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1698847482; x=1699452282; 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=ePIQ7ERPNW9uny7bx9FRhQ706OAx7nnA1dsVvqKABug=; b=HcDb6wcuRg/UNUtCPYaRG/8uNw+eV2OCJL4JyyV2A2QeIl9jRp2B2VZ8Kbp7ZWxggW UX1uAtBPlphRNvzZvjOQvydc0XyVnNzoHHjzhGIvNGSar9ntjCUZP+NAZpb3N0Wx/4Qa 2k+DkB+/IafpV2IYNECDi5H45etXqnZIVxPfrBP6DSj25VC2kWja7eOuBgWL27/McXoY h2iohY6q98eJ3gOKu8EJ8NaZFlP3hG3TVT2OpiaBQTom/VxS2SNkxQeE7ddJGN9FykTk vSRDztRdQvDcQrthsOk1bRFhFlDGq3K3HzKyETkn3rrJoh0oZP4EpfgeTYfiUtRuMAkC /+Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698847482; x=1699452282; 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=ePIQ7ERPNW9uny7bx9FRhQ706OAx7nnA1dsVvqKABug=; b=JXX+IuadQcVIT58KfBQMAabt/Dq4pEJHhH5WL3LIDVQab0vsDTqU5Tudl6cLT5b94N 9MB5/9O4rSLc/N0KHQZECt6ZC8y3GAcUic//m5G2XDbnExFLU1UfpOdzUjAm84hmj8IB BYd+ljSj0HVHpxLj3BxeZi81fO50cW0ib6klmnVMCLaeC3TGh9uAvi9juLZ63VS5A5HO EpXoUhqk4yHRZ8pjZyaQhhB/D4N5FYNqS2WuTFXMjfm0U5SOJsVNMv+uNDW5l49vt2k9 mg96tG2ZfUPLyqJf9Feb0NQ8F/2JAU159ZDielz7eXtQdnnFBVf8GLK5JTjSFNpenF0i qNPA== X-Gm-Message-State: AOJu0YyYBOf5EA6tlihhZbF27+I0E4rDWOKJDhZJfOzAB/3dGPmuB+r4 OgP+2K2R6gq0nzqZ0Gh3mfcNpfCaT8iRiBuj9ku+JvZ+ X-Google-Smtp-Source: AGHT+IFOLvhnMQNg33FOOC1r2UpSTaJvx1ugyKY4bolPkN9jM523DvFVSZdXCa5LJsJI5Hyry9oh3A== X-Received: by 2002:a17:902:fa87:b0:1cc:3773:3d7f with SMTP id lc7-20020a170902fa8700b001cc37733d7fmr8798148plb.21.1698847475010; Wed, 01 Nov 2023 07:04:35 -0700 (PDT) Received: from localhost.localdomain ([125.71.94.114]) by smtp.gmail.com with ESMTPSA id jn7-20020a170903050700b001cc32261bdcsm1396118plb.248.2023.11.01.07.04.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 07:04:34 -0700 (PDT) From: Hyman Huang To: qemu-devel@nongnu.org Cc: Juan Quintela , Peter Xu , Fabiano Rosas , Leonardo Bras , Thomas Huth , Laurent Vivier , Paolo Bonzini , Hyman Huang Subject: [v3 2/6] system/dirtylimit: Drop the reduplicative check Date: Wed, 1 Nov 2023 22:04:05 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::629; envelope-from=yong.huang@smartx.com; helo=mail-pl1-x629.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Checking if dirty limit is in service is done by the dirtylimit_query_all function, drop the reduplicative check in the qmp_query_vcpu_dirty_limit function. Signed-off-by: Hyman Huang Reviewed-by: Fabiano Rosas Message-Id: <31384f768279027560ab952ebc2bbff1ddb62531.1697815117.git.yong.huang@smartx.com> Reviewed-by: Juan Quintela --- system/dirtylimit.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/system/dirtylimit.c b/system/dirtylimit.c index 3666c4cb7c..495c7a7082 100644 --- a/system/dirtylimit.c +++ b/system/dirtylimit.c @@ -652,10 +652,6 @@ static struct DirtyLimitInfoList *dirtylimit_query_all(void) struct DirtyLimitInfoList *qmp_query_vcpu_dirty_limit(Error **errp) { - if (!dirtylimit_in_service()) { - return NULL; - } - return dirtylimit_query_all(); }