bitmap: make bitmap_long_to_byte() and bitmap_byte_to_long() static
authorJane Malalane <jane.malalane@citrix.com>
Tue, 10 Aug 2021 07:29:52 +0000 (09:29 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 10 Aug 2021 07:29:52 +0000 (09:29 +0200)
Functions made static as there are no external callers.

Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jane Malalane <jane.malalane@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/bitmap.c
xen/include/xen/bitmap.h

index b7aa2db7c772a0bc9c98bc38ac371378ec6000bb..bbc3554ae13995a1ed03de51ff9418dfe5b00c94 100644 (file)
@@ -338,7 +338,7 @@ EXPORT_SYMBOL(bitmap_allocate_region);
 
 #ifdef __BIG_ENDIAN
 
-void bitmap_long_to_byte(uint8_t *bp, const unsigned long *lp, int nbits)
+static void bitmap_long_to_byte(uint8_t *bp, const unsigned long *lp, int nbits)
 {
        unsigned long l;
        int i, j, b;
@@ -354,7 +354,7 @@ void bitmap_long_to_byte(uint8_t *bp, const unsigned long *lp, int nbits)
        clamp_last_byte(bp, nbits);
 }
 
-void bitmap_byte_to_long(unsigned long *lp, const uint8_t *bp, int nbits)
+static void bitmap_byte_to_long(unsigned long *lp, const uint8_t *bp, int nbits)
 {
        unsigned long l;
        int i, j, b;
@@ -371,13 +371,13 @@ void bitmap_byte_to_long(unsigned long *lp, const uint8_t *bp, int nbits)
 
 #elif defined(__LITTLE_ENDIAN)
 
-void bitmap_long_to_byte(uint8_t *bp, const unsigned long *lp, int nbits)
+static void bitmap_long_to_byte(uint8_t *bp, const unsigned long *lp, int nbits)
 {
        memcpy(bp, lp, (nbits+7)/8);
        clamp_last_byte(bp, nbits);
 }
 
-void bitmap_byte_to_long(unsigned long *lp, const uint8_t *bp, int nbits)
+static void bitmap_byte_to_long(unsigned long *lp, const uint8_t *bp, int nbits)
 {
        /* We may need to pad the final longword with zeroes. */
        if (nbits & (BITS_PER_LONG-1))
index 634a259645fb598eff40c527411d9e21565a7e4f..e9175ab54a59ccd7d0aa14b5f0a2b2ab6a8cef4f 100644 (file)
@@ -270,9 +270,6 @@ static inline void bitmap_clear(unsigned long *map, unsigned int start,
 #undef bitmap_switch
 #undef bitmap_bytes
 
-void bitmap_long_to_byte(uint8_t *bp, const unsigned long *lp, int nbits);
-void bitmap_byte_to_long(unsigned long *lp, const uint8_t *bp, int nbits);
-
 struct xenctl_bitmap;
 int xenctl_bitmap_to_bitmap(unsigned long *bitmap,
                             const struct xenctl_bitmap *xenctl_bitmap,