lib/sort.c: small cleanups
PATCH 1/1 lib/sort.c: small cleanups
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 <[email protected]>
lib/sort.c renamed from lib/sort.c.old +3 -2
@@ -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;
Quoted 4 lines · Adrian Bunk
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