lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87zl3z8l2w.fsf@gmail.com>
Date:	Wed, 27 Jan 2010 10:21:59 -0800
From:	Don Mullis <don.mullis@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	airlied@...hat.com, andi@...stfloor.org, david@...morbit.com,
	dedekind@...radead.org
Subject: [PATCH v2 3/3] lib: Build list_sort() only if needed

Build list_sort() only for configs that need it -- those that don't
save ~581 bytes (i386).

Signed-off-by: Don Mullis <don.mullis@...il.com>
Cc: Dave Airlie <airlied@...hat.com>            
Cc: Andi Kleen <andi@...stfloor.org>            
Cc: Dave Chinner <david@...morbit.com>          
Cc: Artem Bityutskiy <dedekind@...radead.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ