Message ID | 20241031231627.14316-2-richard.weiyang@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7D3EE67490 for <linux-mm@archiver.kernel.org>; Thu, 31 Oct 2024 23:17:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 73C676B009B; Thu, 31 Oct 2024 19:17:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 67F7B6B009D; Thu, 31 Oct 2024 19:17:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A2806B009C; Thu, 31 Oct 2024 19:17:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 252FC6B009A for <linux-mm@kvack.org>; Thu, 31 Oct 2024 19:17:00 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D67B5C1880 for <linux-mm@kvack.org>; Thu, 31 Oct 2024 23:16:59 +0000 (UTC) X-FDA: 82735459254.04.F225359 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by imf02.hostedemail.com (Postfix) with ESMTP id 28E878001B for <linux-mm@kvack.org>; Thu, 31 Oct 2024 23:16:01 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=GcwZenhl; spf=pass (imf02.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.42 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730416399; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=0lssgk63PrG0F1GiC5EiShIsBNyhgWemQsSMEdRh8q8=; b=uCW3CWtGSBchf40zz7UY2h9fS/62/KEauVHGotyQrHIMEvuwsliQp8sXXY2S41TYz6WLj/ QFEjhQaYsWDHpA+D2lWdjwE2f8zjdl8T/TFPzKMZ3Uad2dMezxPV92HsrrWstQcS0eHyEz tnOF3nr/I+Ez6dMHLpGs2L7YM1FfhhE= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=GcwZenhl; spf=pass (imf02.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.42 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730416399; a=rsa-sha256; cv=none; b=nD5ttxD3XAvxf69N15mw9oHRxWEdnuXLNtV1TK/KggHAhm2ZkH/qC7kj7o/MqMjvMLJeh6 QF0SyFy/CtRmtXozHyJcb9oi69FNrI108jjSbXJUog4wqq0FYspz5HQFexZkjgfma5bmnO u467nfuYDdRiQqxobDhSdys4jVdgaN0= Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a9a0f198d38so217778666b.1 for <linux-mm@kvack.org>; Thu, 31 Oct 2024 16:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730416613; x=1731021413; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=0lssgk63PrG0F1GiC5EiShIsBNyhgWemQsSMEdRh8q8=; b=GcwZenhl7kum18ksN0+N5dJLvX2/4X4/DJw1dC1ClFzPyyqJvEXuvpHgKmy+JxhhS7 ny4quGiFvYVafEraorvE0Dj9MiABwTViSweKk39IVCAST0EW4Oq5ifr9GFNcVlZo7Hyv ZhklBM9YbahoP/7W0LvwHAjBgFCKHzWB2pCp0fEw1Au5A63LTZNA4d/CcVQDn5py0TlC qDQFdLM942NJx6yvzxYI+E4M4nDowEA7z9bt4Vx4Uy29wGlE5lO94uwPfEBsRpBpHi6F e3Y2ghxTWsd2QSWHvtfLM4HEEMdOts8smlXITdGsCOdqYkabEPkS2FglBmg5bNFsfXPR IHQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730416613; x=1731021413; h=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=0lssgk63PrG0F1GiC5EiShIsBNyhgWemQsSMEdRh8q8=; b=Tpi+PqOImvIJNYYv3o3QLJGcXmj2T0XJb6bUuJXCkoLLe/PLPZgFi96uIhCGINr+rq cYgKDj7wLPA2Z2GR/LqyBVrYR5+G1Ytetmhx/E/NBsBiZh+d4zUp5cVTI8iIpb3w21QZ MF8JCnGOvv1K7A8jcU4hnCA6VtuZyMBJWdmijEG1PcXi7ME/buLpzV10u8P06wIOTo3Y xn1cixz53b/J9gd0U8L04yWUKnoaF+/T0GhZxncvITtWwAFMl58WLzR8Bs/VHTJjPec8 ErpF8DnnpXC9U5rXnD/202LN0iRCug8vfG851L7nnwwQ0ft9yuJTRr9huFdOa0G1jKzP BPrw== X-Forwarded-Encrypted: i=1; AJvYcCWWunRxkLTLIlKYnP/ycroHHL2JF6cWcRYJu9KX33k1/rKAnwEm+12fOjfhV0YqZ/jEzpDkth8yaQ==@kvack.org X-Gm-Message-State: AOJu0YybM0LMbeAVl6a+VkbQOKdg5N5yXQs8kfyyr+dk0Z40RIuH8wLc JqqVpThkYrbl2S+GDrCUBkEpeBYpPxJTDz41LbFxbsA8lUZogbM0 X-Google-Smtp-Source: AGHT+IHNsUN7FcAQIsdM/3jaLFreiYqGkBILS0Zj/u6ZBY3NxO0WIPYxStivLHmPqkN04A/pyXQ1UQ== X-Received: by 2002:a17:907:97c1:b0:a99:4e35:9a25 with SMTP id a640c23a62f3a-a9e655b973cmr146531766b.44.1730416612632; Thu, 31 Oct 2024 16:16:52 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e565df8f6sm116923166b.140.2024.10.31.16.16.49 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Oct 2024 16:16:50 -0700 (PDT) From: Wei Yang <richard.weiyang@gmail.com> To: Liam.Howlett@oracle.com, akpm@linux-foundation.org Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, Wei Yang <richard.weiyang@gmail.com>, "Liam R . Howlett" <Liam.Howlett@Oracle.com>, Sidhartha Kumar <sidhartha.kumar@oracle.com>, Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Subject: [PATCH v5 1/5] maple_tree: print empty for an empty tree on mt_dump() Date: Thu, 31 Oct 2024 23:16:23 +0000 Message-Id: <20241031231627.14316-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20241031231627.14316-1-richard.weiyang@gmail.com> References: <20241031231627.14316-1-richard.weiyang@gmail.com> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 28E878001B X-Stat-Signature: bq4yos39xf3iotzkg4kpgp49tsbdbsuw X-Rspam-User: X-HE-Tag: 1730416561-505099 X-HE-Meta: U2FsdGVkX19LQpzMeDifyfDUHMwg7qEfCcLIKiUh3JRBwF8CJZo0VqJcynDTIvEd4Mgw6ZP5EO0nFFXlTdvTUF0jRpP3+JukgQ1AnQLe3EJaX2lyfHrc6wWa+buZons4SiRr7JGJDE/ybdgTykXSq2Av09I/rquf5m89JpnWtM+17BWnLioClI8R2Q529S7CNFmtCrOC4xmSQ5IZDIQgyT7ro4Ed/VhKPwjZ8QzLb5Z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dth8St0cikvBunQUvF+SG/vuySRzC6K3D704Tx/fyYwaNU3cFEdQmpmh1TeDmIPFery7Z6GNwnbzMC/jJwnnKb/WrOpWCak/JmkijA+gXHKfX2zFd0sri/tpFkxUL1db9PKtKY4OlPqx1VRecGKcCshcEp4xWsypfmkJNoM21/LN4rC5wA26A6Ptd+/Ea+AyEX X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
refine storing null
|
expand
|
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 38aa8abf8eb8..523355fb2bbe 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -7273,10 +7273,12 @@ void mt_dump(const struct maple_tree *mt, enum mt_dump_format format) pr_info("maple_tree(" PTR_FMT ") flags %X, height %u root " PTR_FMT "\n", mt, mt->ma_flags, mt_height(mt), entry); - if (!xa_is_node(entry)) - mt_dump_entry(entry, 0, 0, 0, format); - else if (entry) + if (xa_is_node(entry)) mt_dump_node(mt, entry, 0, mt_node_max(entry), 0, format); + else if (entry) + mt_dump_entry(entry, 0, 0, 0, format); + else + pr_info("(empty)\n"); } EXPORT_SYMBOL_GPL(mt_dump);