[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] lib: drop size parameter from sort()'s swap callback



commit 5fe7e734e0a770b6c6cf2eadddc55c69e6c5e028
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Jul 30 10:48:11 2025 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Jul 30 12:04:08 2025 +0200

    lib: drop size parameter from sort()'s swap callback
    
    This was needed only for generic_swap(), which disappeared in
    8cb0341a61fa ("xen/sort: Switch to an extern inline implementation").
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
---
 xen/arch/arm/io.c                     | 2 +-
 xen/arch/x86/extable.c                | 2 +-
 xen/common/device-tree/bootinfo-fdt.c | 2 +-
 xen/include/xen/sort.h                | 8 ++++----
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/xen/arch/arm/io.c b/xen/arch/arm/io.c
index e599bbe043..9707cadcf8 100644
--- a/xen/arch/arm/io.c
+++ b/xen/arch/arm/io.c
@@ -100,7 +100,7 @@ static int cmp_mmio_handler(const void *key, const void 
*elem)
     return 0;
 }
 
-static void swap_mmio_handler(void *_a, void *_b, size_t size)
+static void swap_mmio_handler(void *_a, void *_b)
 {
     struct mmio_handler *a = _a, *b = _b;
 
diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c
index 5f5103179a..cf637d0921 100644
--- a/xen/arch/x86/extable.c
+++ b/xen/arch/x86/extable.c
@@ -39,7 +39,7 @@ static int init_or_livepatch cf_check cmp_ex(const void *a, 
const void *b)
        return 0;
 }
 
-static void init_or_livepatch cf_check swap_ex(void *a, void *b, size_t size)
+static void init_or_livepatch cf_check swap_ex(void *a, void *b)
 {
        struct exception_table_entry *l = a, *r = b, tmp;
        long delta = b - a;
diff --git a/xen/common/device-tree/bootinfo-fdt.c 
b/xen/common/device-tree/bootinfo-fdt.c
index 2aa94b91a4..272b5a6c0a 100644
--- a/xen/common/device-tree/bootinfo-fdt.c
+++ b/xen/common/device-tree/bootinfo-fdt.c
@@ -449,7 +449,7 @@ static int __init cmp_memory_node(const void *key, const 
void *elem)
     return 0;
 }
 
-static void __init swap_memory_node(void *_a, void *_b, size_t size)
+static void __init swap_memory_node(void *_a, void *_b)
 {
     struct membank *a = _a, *b = _b;
 
diff --git a/xen/include/xen/sort.h b/xen/include/xen/sort.h
index b953286284..1f2752434b 100644
--- a/xen/include/xen/sort.h
+++ b/xen/include/xen/sort.h
@@ -24,7 +24,7 @@ extern gnu_inline
 #endif
 void sort(void *base, size_t num, size_t size,
           int (*cmp)(const void *a, const void *b),
-          void (*swap)(void *a, void *b, size_t size))
+          void (*swap)(void *a, void *b))
 {
     /* pre-scale counters for performance */
     size_t i = (num / 2) * size, n = num * size, c, r;
@@ -39,7 +39,7 @@ void sort(void *base, size_t num, size_t size,
                 c += size;
             if ( cmp(base + r, base + c) >= 0 )
                 break;
-            swap(base + r, base + c, size);
+            swap(base + r, base + c);
         }
     }
 
@@ -47,7 +47,7 @@ void sort(void *base, size_t num, size_t size,
     for ( i = n; i > 0; )
     {
         i -= size;
-        swap(base, base + i, size);
+        swap(base, base + i);
         for ( r = 0; r * 2 + size < i; r = c )
         {
             c = r * 2 + size;
@@ -55,7 +55,7 @@ void sort(void *base, size_t num, size_t size,
                 c += size;
             if ( cmp(base + r, base + c) >= 0 )
                 break;
-            swap(base + r, base + c, size);
+            swap(base + r, base + c);
         }
     }
 }
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.