From nobody Thu May 2 04:28:41 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1582637204; cv=none; d=zohomail.com; s=zohoarc; b=EVhuqMMkeAX9ZrAzUFlCl9SfjHvSZiFRPXNtHHVw6GDtTvPxHaO7Z7B8/njTwfVaBRwWJmi1AmK5HWS6acHQv3KFi9LL0qyq4L0HkhbT9X0tuL1gD/1BNmdStQTB0/WXvlgNdOnT7gfEYX7ZLms1Wijw6s6hxsyeB9zz2bfOfb0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582637204; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=n6fwgOFSEWGuYIi9B0/I/dMsh8mgStxe5/0FeIB2H5E=; b=IuHvaG9/lobLrWJpxNthSw6U3GJhPOgU57bflkRnhYU7XZrv4WW7auLsM4j78tvDMXllR6hCqWyzjo4Kc/I9vdDKZaZrgxXT0ieVg7Si2Luxn+/fqp5IEBC4hf+fUy/CdF+ORU53xRtlNVtsJSy5lrdH8XUiEbMBUBY0vO35suI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 158263720385284.28422509834184; Tue, 25 Feb 2020 05:26:43 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6aDt-00089d-OP; Tue, 25 Feb 2020 13:26:05 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6aDs-00089W-QO for xen-devel@lists.xenproject.org; Tue, 25 Feb 2020 13:26:04 +0000 Received: from mail-ed1-f67.google.com (unknown [209.85.208.67]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 5e77c562-57d2-11ea-9300-12813bfff9fa; Tue, 25 Feb 2020 13:26:03 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id v28so16186738edw.12 for ; Tue, 25 Feb 2020 05:26:03 -0800 (PST) Received: from ufe34d9ed68d054.ant.amazon.com (54-240-197-235.amazon.com. [54.240.197.235]) by smtp.gmail.com with ESMTPSA id y4sm958463ejj.87.2020.02.25.05.26.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 05:26:01 -0800 (PST) X-Inumbo-ID: 5e77c562-57d2-11ea-9300-12813bfff9fa 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; bh=uZA9A6HxbvZTEBvpgsZ28pS/XyxkUyt0ZrvPfBZrho4=; b=N9RUHcYrQ774yl+OulM7PQaM8huHJ8A3hB8U0zpeCbEfQbmZkcECH7XnGZ/zHSPu9B FeimUOrM9esEY+AGWgMcP08fsvmfKfUYiR5JGSV8FqaYakplrUzSjFt9vNBTO46xNrfu CrI4wgaeSvJm6XN4519I+bT09M9Wg6dffEOZDGl9o7CYNlQhJqzHJwTjIEIpJZewl9hb /M2iUUW1rX9WSI/60d1wf76cyAs7UAe/yAurGV8StHM03VQ1DzsKXQbFI/5RIu8OI7/h hZ/vUUyP9GOjNOC+BKXXjx3/EFt9KlqlL0Fo0BZEN5f0jV6L6azhUSkvdwAt3OlRw2L5 dPOA== X-Gm-Message-State: APjAAAXjNE70rF/7LTo3z3Zn0MRMml7Mol2NMmnx9b4KDAo4O0gyqZ19 +JGdKN4BSS7dXVWtPRa4ukF+JrKPEC0= X-Google-Smtp-Source: APXvYqwy9rB6Bm71qBiS2+cq0l76GImr6YPu2vYdk0M2sVt+vJMbhDsRp6fC9aYSz6qIfz8KBMA9gA== X-Received: by 2002:a17:906:8306:: with SMTP id j6mr51613585ejx.105.1582637162276; Tue, 25 Feb 2020 05:26:02 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 25 Feb 2020 13:25:58 +0000 Message-Id: <20200225132558.26152-1-julien@xen.org> X-Mailer: git-send-email 2.17.1 Subject: [Xen-devel] [PATCH] xen/grant-table: Remove outdated warning in gnttab_grow_table() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , Andrew Cooper , Julien Grall , Ian Jackson , George Dunlap , Jan Beulich MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" One of the warning message in gnttab_grow_table() refers to a function was removed in commit 6425f91c72 "xen/gnttab: Fold grant_table_{create, set_limits}() into grant_table_init()". Since the commit, gt->active will be allocated while initializing the grant table at domain creation. Therefore gt-active will always be valid. Rather than replacing the warning by another one, we can now downgrade the check to an ASSERT(). Signed-off-by: Julien Grall --- xen/common/grant_table.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index bc37acae0e..930d20b346 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -1793,11 +1793,7 @@ gnttab_grow_table(struct domain *d, unsigned int req= _nr_frames) struct grant_table *gt =3D d->grant_table; unsigned int i, j; =20 - if ( unlikely(!gt->active) ) - { - gprintk(XENLOG_WARNING, "grant_table_set_limits() call missing\n"); - return -ENODEV; - } + ASSERT(gt->active); =20 if ( req_nr_frames < INITIAL_NR_GRANT_FRAMES ) req_nr_frames =3D INITIAL_NR_GRANT_FRAMES; --=20 2.17.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel