* [2.6 patch] lib/sort.c: small cleanups
@ 2005-09-03 13:25 Adrian Bunk
2005-09-04 11:35 ` Ingo Oeser
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2005-09-03 13:25 UTC (permalink / raw)
To: Matt Mackall; +Cc: linux-kernel
This patch contains the following small cleanups:
- make two needlessly global functions static
- every file should #include the header files containing the prototypes
of it's global functions
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.13-mm1-full/lib/sort.c.old 2005-09-03 14:02:17.000000000 +0200
+++ linux-2.6.13-mm1-full/lib/sort.c 2005-09-03 14:03:02.000000000 +0200
@@ -6,15 +6,16 @@
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/sort.h>
-void u32_swap(void *a, void *b, int size)
+static void u32_swap(void *a, void *b, int size)
{
u32 t = *(u32 *)a;
*(u32 *)a = *(u32 *)b;
*(u32 *)b = t;
}
-void generic_swap(void *a, void *b, int size)
+static void generic_swap(void *a, void *b, int size)
{
char t;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [2.6 patch] lib/sort.c: small cleanups
2005-09-03 13:25 [2.6 patch] lib/sort.c: small cleanups Adrian Bunk
@ 2005-09-04 11:35 ` Ingo Oeser
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Oeser @ 2005-09-04 11:35 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Matt Mackall, linux-kernel
On Saturday 03 September 2005 15:25, Adrian Bunk wrote:
> This patch contains the following small cleanups:
> - make two needlessly global functions static
> - every file should #include the header files containing the prototypes
> of it's global functions
While this is a nice cleanup, does anybody remember,
why the inner loops are duplicated in the source?
If there are no arguments for it, I would like to consolidate them
to a function or a define, if they share to much state.
Or is the duplicate just considered cleaner?
Regards
Ingo Oeser
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-09-04 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-03 13:25 [2.6 patch] lib/sort.c: small cleanups Adrian Bunk
2005-09-04 11:35 ` Ingo Oeser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox