Removes size argument from the swap function because:
1) It wasn't used.
2) Custom swap function knows what kind of objects it swaps,
so it already knows their sizes.
Signed-off-by: Andrey Abramov
Reviewed by: George Spelvin
---
arch/x86/kernel/unwind_orc.
unction is now
a waste of time as well as code.
Signed-off-by: Andrey Abramov
Reviewed by: George Spelvin
---
v2->v3: nothing changed
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..5deaae7fcead
mized" custom swap function is now
a waste of time as well as code.
Signed-off-by: Andrey Abramov
Reviewed by: George Spelvin
---
v2->v3: nothing changed
fs/ocfs2/dir.c | 13 +
fs/ocfs2/refcounttree.c | 13 +++--
fs/ocfs2/xattr.c| 15 +++
3
me as well as code.
Signed-off-by: Andrey Abramov
Reviewed by: George Spelvin
Acked-by: Michael Ellerman (powerpc)
---
v2->v3: nothing changed
arch/powerpc/kernel/module_32.c | 17 +
arch/powerpc/kernel/module_64.c | 17 +
2 files changed, 2 insertions(+),
mized" custom swap function is now
a waste of time as well as code.
Signed-off-by: Andrey Abramov
Reviewed by: George Spelvin
Acked-by: Vineet Gupta
---
v2->v3: nothing changed
arch/arc/kernel/unwind.c | 20 ++--
1 file changed, 2 insertions(+), 18 deletions(-)
diff --g
nows what kind of objects it swaps,
so it already knows their sizes.
v1->v2: Only commit messages have changed to better explain
the purpose of commits. (Thanks to George Spelvin and Greg KH)
v2->v3: Patch #5 now completely removes the size argument
Andrey Abramov
generate an additional EXTB instruction to promote to 32-bit int
> with
> sign extension before using the value.
>
> -Vineet
George Spelvin wrote "So how about *deleting* the parameter instead?
That simplifies everything.", and he is right,
so I am just going to compl
ly.
Signed-off-by: Andrey Abramov
Reviewed by: George Spelvin
---
arch/x86/kernel/unwind_orc.c | 2 +-
include/linux/sort.h | 2 +-
kernel/jump_label.c | 2 +-
lib/extable.c| 2 +-
lib/sort.c | 6 +++---
5 files changed, 7 insertions(+), 7 deletion
unction is now
a waste of time as well as code.
Signed-off-by: Andrey Abramov
Reviewed by: George Spelvin
---
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..5deaae7fcead 100644
--- a/fs/ubifs/find.
mized" custom swap function is now
a waste of time as well as code.
Signed-off-by: Andrey Abramov
Reviewed by: George Spelvin
---
fs/ocfs2/dir.c | 13 +
fs/ocfs2/refcounttree.c | 13 +++--
fs/ocfs2/xattr.c| 15 +++
3 files changed, 7 inserti
me as well as code.
Signed-off-by: Andrey Abramov
Reviewed by: George Spelvin
---
arch/powerpc/kernel/module_32.c | 17 +
arch/powerpc/kernel/module_64.c | 17 +
2 files changed, 2 insertions(+), 32 deletions(-)
diff --git a/arch/powerpc/kernel/module_32.c b/ar
mized" custom swap function is now
a waste of time as well as code.
Signed-off-by: Andrey Abramov
Reviewed by: George Spelvin
---
arch/arc/kernel/unwind.c | 20 ++--
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwi
h doesn't match the size_t element size passed to sort()
function itself. So change it to size_t.
v1->v2: Only commit messages have changed to better explain
the purpose of commits. (Thanks to George Spelvin and Greg KH)
Andrey Abramov (5):
arch/arc: unwind.c: replace swap function
30.03.2019, 23:17, "George Spelvin" :
> On Sat, 30 Mar 2019 at 19:38:26 +0100 greh k-h wrote;
>> On Sat, Mar 30, 2019 at 07:43:53PM +0300, Andrey Abramov wrote:
>>> Replace int type with size_t type of the size argument
>>> in the swap function, also aff
Replace int type with size_t type of the size argument
in the swap function, also affect all its dependencies.
Signed-off-by: Andrey Abramov
---
arch/x86/kernel/unwind_orc.c | 2 +-
include/linux/sort.h | 2 +-
kernel/jump_label.c | 2 +-
lib/extable.c| 2
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
Replace relaswap with built-in one, because of relaswap
does a simple byte to byte swap.
Signed-off-by: Andrey Abramov
---
arch/powerpc/kernel/module_32.c | 17 +
arch/powerpc/kernel/module_64.c | 17 +
2 files changed, 2 insertions(+), 32 deletions(-)
diff
Replace dx_leaf_sort_swap, swap_refcount_rec and swap_xe functions
with built-in one, because they do only a simple byte to byte swap.
Signed-off-by: Andrey Abramov
---
fs/ocfs2/dir.c | 13 +
fs/ocfs2/refcounttree.c | 13 +++--
fs/ocfs2/xattr.c| 15
Replace swap_eh_frame_hdr_table_entries with built-in one, because
swap_eh_frame_hdr_table_entries does a simple byte to byte swap.
Signed-off-by: Andrey Abramov
---
arch/arc/kernel/unwind.c | 20 ++--
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/arch/arc
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
20 matches
Mail list logo