From: Don Mullis <don.mullis@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: airlied@redhat.com, andi@firstfloor.org, david@fromorbit.com,
dedekind@infradead.org
Subject: [PATCH v2 3/3] lib: Build list_sort() only if needed
Date: Wed, 27 Jan 2010 10:21:59 -0800 [thread overview]
Message-ID: <87zl3z8l2w.fsf@gmail.com> (raw)
In-Reply-To: <878wbja0h6.fsf@gmail.com> (Don Mullis's message of "Wed, 27 Jan 2010 10:04:05 -0800")
Build list_sort() only for configs that need it -- those that don't
save ~581 bytes (i386).
Signed-off-by: Don Mullis <don.mullis@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Artem Bityutskiy <dedekind@infradead.org>
---
drivers/gpu/drm/Kconfig | 1 +
fs/ubifs/Kconfig | 1 +
lib/Kconfig | 3 +++
lib/Makefile | 3 ++-
4 files changed, 7 insertions(+), 1 deletion(-)
Index: linux-2.6/drivers/gpu/drm/Kconfig
===================================================================
--- linux-2.6.orig/drivers/gpu/drm/Kconfig 2010-01-25 21:45:25.000000000 -0800
+++ linux-2.6/drivers/gpu/drm/Kconfig 2010-01-25 21:48:14.000000000 -0800
@@ -9,6 +9,7 @@ menuconfig DRM
depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU
select I2C
select I2C_ALGOBIT
+ select LIST_SORT
help
Kernel-level support for the Direct Rendering Infrastructure (DRI)
introduced in XFree86 4.0. If you say Y here, you need to select
Index: linux-2.6/fs/ubifs/Kconfig
===================================================================
--- linux-2.6.orig/fs/ubifs/Kconfig 2010-01-25 21:40:35.000000000 -0800
+++ linux-2.6/fs/ubifs/Kconfig 2010-01-25 21:47:54.000000000 -0800
@@ -7,6 +7,7 @@ config UBIFS_FS
select CRYPTO if UBIFS_FS_ZLIB
select CRYPTO_LZO if UBIFS_FS_LZO
select CRYPTO_DEFLATE if UBIFS_FS_ZLIB
+ select LIST_SORT
depends on MTD_UBI
help
UBIFS is a file system for flash devices which works on top of UBI.
Index: linux-2.6/lib/Makefile
===================================================================
--- linux-2.6.orig/lib/Makefile 2010-01-25 21:39:23.000000000 -0800
+++ linux-2.6/lib/Makefile 2010-01-25 21:43:06.000000000 -0800
@@ -21,7 +21,7 @@ lib-y += kobject.o kref.o klist.o
obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
- string_helpers.o gcd.o list_sort.o
+ string_helpers.o gcd.o
ifeq ($(CONFIG_DEBUG_KOBJECT),y)
CFLAGS_kobject.o += -DDEBUG
@@ -42,6 +42,7 @@ obj-$(CONFIG_GENERIC_FIND_LAST_BIT) += f
obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o
obj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o
obj-$(CONFIG_BTREE) += btree.o
+obj-$(CONFIG_LIST_SORT) += list_sort.o
obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o
obj-$(CONFIG_DEBUG_LIST) += list_debug.o
obj-$(CONFIG_DEBUG_OBJECTS) += debugobjects.o
Index: linux-2.6/lib/Kconfig
===================================================================
--- linux-2.6.orig/lib/Kconfig 2010-01-25 21:39:23.000000000 -0800
+++ linux-2.6/lib/Kconfig 2010-01-25 21:52:45.000000000 -0800
@@ -166,6 +166,9 @@ config TEXTSEARCH_FSM
config BTREE
boolean
+config LIST_SORT
+ boolean
+
config HAS_IOMEM
boolean
depends on !NO_IOMEM
prev parent reply other threads:[~2010-01-27 18:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 18:04 [PATCH v2 1/3] lib: More scalable list_sort() Don Mullis
2010-01-27 18:13 ` [PATCH v2 2/3] lib: Revise list_sort() header comment Don Mullis
2010-01-27 18:21 ` Don Mullis [this message]
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=87zl3z8l2w.fsf@gmail.com \
--to=don.mullis@gmail.com \
--cc=airlied@redhat.com \
--cc=andi@firstfloor.org \
--cc=david@fromorbit.com \
--cc=dedekind@infradead.org \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome