[PATCH 4/5] ubifs: find.c: replace swap function with built-in one

2019-03-30 Thread Andrey Abramov
Replace swap_dirty_idx function with built-in one, because swap_dirty_idx does only a simple byte to byte swap. Signed-off-by: Andrey Abramov --- fs/ubifs/find.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/fs/ubifs/find.c b/fs/ubifs/find.c index f9646835b026

[PATCH 0/5] simple sort swap function usage improvements

2019-03-30 Thread Andrey Abramov
bsystem (after that only 3 files implement custom swap - arch/x86/kernel/unwind_orc.c, kernel/jump_label.c and lib/extable.c). Patch #5 replaces the int type with the size_t type of the size argument in the swap function. Andrey Abramov (5): arch/arc: unwind.c: replace swap function with built-in

Re: [PATCH 0/5] lib/sort & lib/list_sort: faster and smaller

2019-03-15 Thread Andrey Abramov
5) With Best Regards, Andrey Abramov.

Re: [PATCH 4/5] lib/list_sort: Simplify and remove MAX_LIST_LENGTH_BITS

2019-03-15 Thread Andrey Abramov
e with Geert who said: "use size_t everywhere". With Best Regards, Andrey Abramov.

Re: [PATCH 4/5] lib/list_sort: Simplify and remove MAX_LIST_LENGTH_BITS

2019-03-15 Thread Andrey Abramov
> I'm trying to present the case to spur discussion, but it realy is > a *question* I'm asking about whether to do that, not a suggestion > phrased as a question. > If it's just x86_64, use size_t everywhere, and let them suffer, for not > being real 64-bit ;-) But what is the problem of local

Re: [PATCH 1/5] lib/sort: Make swap functions more generic

2019-03-14 Thread Andrey Abramov
(in one file near each other), so I don't think that there will be any confusion about size. But actually, it doesn't matter which name will you take, because the meaning of each, in my opinion, is obvious enough, so I don't mind about any of these options. -- With Best Regards, Andrey Abramov

Re: [PATCH 1/5] lib/sort: Make swap functions more generic

2019-03-09 Thread Andrey Abramov
> Although I'm thinking of: > > static bool __attribute_const__ > is_aligned(const void *base, size_t size, unsigned char align) > { > unsigned char lsbits = (unsigned char)size; > > (void)base; > #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS > lsbits |= (unsigned char)(uintptr_t)base; > #endif >

[PATCH 1/1] Lib: sort.c: replaced heap sort algorithm with introspective sort

2019-02-05 Thread Andrey Abramov
Replaced heap sort algorithm with faster introspective sort algorithm. Signed-off-by: Andrey Abramov --- v1: The introspective sort algorithm is faster the heap sort (for example on my machine on a 100MB of random data it was consistently almost twice faster) and it doesn't have the worst case

[PATCH] Fixed code style issues in the drivers/md/md.c

2018-09-28 Thread Andrey Abramov
Fixed many code style issues in the drivers/md/md.c. I used scripts/checkpatch.pl utility to find and fix code style issues and also fixed some by hands. I reviewed all changes made by scripts/checkpatch.pl. And of course compiled it (kernel) successfully. Signed-off-by: Andrey Abramov

[PATCH] Fixed code style issues in the drivers/md/md.c

2018-09-28 Thread Andrey Abramov
Fixed many code style issues in the drivers/md/md.c. I used scripts/checkpatch.pl utility to find and fix code style issues and also fixed some by hands. I reviewed all changes made by scripts/checkpatch.pl. And of course compiled it (kernel) successfully. Signed-off-by: Andrey Abramov

[PATCH] Fixed some code style issues in the fs/ext4/...

2018-09-27 Thread Andrey Abramov
Signed-off-by: Andrey Abramov --- fs/ext4/balloc.c | 7 +++ fs/ext4/block_validity.c | 4 +++- fs/ext4/file.c | 16 ++-- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index e5d6ee61ff48..87dca171d7f6

[PATCH] Fixed some code style issues in the fs/ext4/...

2018-09-27 Thread Andrey Abramov
Signed-off-by: Andrey Abramov --- fs/ext4/balloc.c | 7 +++ fs/ext4/block_validity.c | 4 +++- fs/ext4/file.c | 16 ++-- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index e5d6ee61ff48..87dca171d7f6