From patchwork Fri Mar 25 01:08:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12791105 Return-Path: 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 2B877C433EF for ; Fri, 25 Mar 2022 01:08:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 64C526B0074; Thu, 24 Mar 2022 21:08:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5FC786B0075; Thu, 24 Mar 2022 21:08:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 49F406B0078; Thu, 24 Mar 2022 21:08:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by kanga.kvack.org (Postfix) with ESMTP id 37D866B0074 for ; Thu, 24 Mar 2022 21:08:54 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D60A4182890FD for ; Fri, 25 Mar 2022 01:08:53 +0000 (UTC) X-FDA: 79281124146.29.BA2BAAF Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf15.hostedemail.com (Postfix) with ESMTP id 66D40A002C for ; Fri, 25 Mar 2022 01:08:53 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2A0F4B8270F; Fri, 25 Mar 2022 01:08:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3ACFC340ED; Fri, 25 Mar 2022 01:08:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1648170530; bh=VLhfRR9r/5SSkltTPbMxeOKGTFsZOOoGY/nRfOITTy4=; h=Date:To:From:In-Reply-To:Subject:From; b=jE+T3OXif7iz+nH//ki4w4Il/k5WsId8YNZjFzZlI0V8R26bvhgoCKhDzueQ+6d7e ZJ/4gg7NLp+qeKV3BhFw+JLDpHXGgdbBFX7bxjFwq6z4OK1/bsbjBKG+GHOChgpzwM v50J2QuUZQD8Sta06FCpLAXjn9ybIkx41I7YewJg= Date: Thu, 24 Mar 2022 18:08:50 -0700 To: hanshenghong2019@email.szu.edu.cn,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220324180758.96b1ac7e17675d6bc474485e@linux-foundation.org> Subject: [patch 005/114] tools/vm/page_owner_sort.c: two trivial fixes Message-Id: <20220325010850.D3ACFC340ED@smtp.kernel.org> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 66D40A002C X-Rspam-User: Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=jE+T3OXi; dmarc=none; spf=pass (imf15.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Stat-Signature: 4bspepof6pkxtu3dusxwb9ykdgaub4xm X-HE-Tag: 1648170533-609930 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000007, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Shenghong Han Subject: tools/vm/page_owner_sort.c: two trivial fixes 1) There is an unused variable. It's better to delete it. 2) One case is missing in the usage(). Link: https://lkml.kernel.org/r/20211213164518.2461-1-hanshenghong2019@email.szu.edu.cn Signed-off-by: Shenghong Han Signed-off-by: Andrew Morton --- tools/vm/page_owner_sort.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/tools/vm/page_owner_sort.c~tools-vm-page_owner_sortc-two-trivial-fixes +++ a/tools/vm/page_owner_sort.c @@ -41,8 +41,6 @@ static struct block_list *list; static int list_size; static int max_size; -struct block_list *block_head; - int read_block(char *buf, int buf_size, FILE *fin) { char *curr = buf, *const buf_end = buf + buf_size; @@ -249,7 +247,8 @@ static void usage(void) "-p Sort by pid.\n" "-a Sort by memory allocate time.\n" "-r Sort by memory release time.\n" - "-c cull by comparing stacktrace instead of total block.\n" + "-c Cull by comparing stacktrace instead of total block.\n" + "-f Filter out the information of blocks whose memory has not been released.\n" ); }