public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: akpm@linux-foundation.org, acme@kernel.org
Cc: peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com,
	kan.liang@linux.intel.com, jserv@ccns.ncku.edu.tw,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Kuan-Wei Chiu <visitorckw@gmail.com>
Subject: [PATCH 1/3] lib/list_sort: Remove unnecessary header includes
Date: Sat, 12 Oct 2024 12:28:26 +0800	[thread overview]
Message-ID: <20241012042828.471614-2-visitorckw@gmail.com> (raw)
In-Reply-To: <20241012042828.471614-1-visitorckw@gmail.com>

After commit 043b3f7b6388 ("lib/list_sort: simplify and remove
MAX_LIST_LENGTH_BITS"), list_sort.c no longer uses ARRAY_SIZE() (which
required kernel.h and bug.h for BUILD_BUG_ON_ZERO via __must_be_array)
or memset() (which required string.h). As these headers are no longer
needed, removes them.

There are no changes to the generated code, as confirmed by
'objdump -d'. Additionally, 'wc -l' shows that the size of
lib/.list_sort.o.cmd is reduced from 259 lines to 101 lines.

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
---
 lib/list_sort.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/list_sort.c b/lib/list_sort.c
index 0fb59e92ca2d..8d3f623536fe 100644
--- a/lib/list_sort.c
+++ b/lib/list_sort.c
@@ -1,9 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
-#include <linux/kernel.h>
-#include <linux/bug.h>
 #include <linux/compiler.h>
 #include <linux/export.h>
-#include <linux/string.h>
 #include <linux/list_sort.h>
 #include <linux/list.h>
 
-- 
2.34.1


  reply	other threads:[~2024-10-12  4:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-12  4:28 [PATCH 0/3] Remove unnecessary header includes from {tools/}lib/list_sort.c Kuan-Wei Chiu
2024-10-12  4:28 ` Kuan-Wei Chiu [this message]
2024-10-12  4:28 ` [PATCH 2/3] tools/lib/list_sort: Remove unnecessary header includes Kuan-Wei Chiu
2024-10-12  4:28 ` [PATCH 3/3] perf tools: Update expected diff for lib/list_sort.c Kuan-Wei Chiu
2024-10-22  4:20 ` [PATCH 0/3] Remove unnecessary header includes from {tools/}lib/list_sort.c Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241012042828.471614-2-visitorckw@gmail.com \
    --to=visitorckw@gmail.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=jserv@ccns.ncku.edu.tw \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox