xen/bitmap: Make bitmap_long_to_byte() and bitmap_byte_to_long() static
PATCH 1/1 xen/bitmap: Make bitmap_long_to_byte() and bitmap_byte_to_long() static
Functions made static as there are no external callers.
Suggested-by Andrew Cooper <[email protected]>
Signed-off-by Jane Malalane <[email protected]>
---
CC: Andrew Cooper <[email protected]>
CC: George Dunlap <[email protected]>
CC: Ian Jackson <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Julien Grall <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Wei Liu <[email protected]>
--- xen/common/bitmap.c | 8 ++++---- xen/include/xen/bitmap.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-)
xen/common/bitmap.c +4 -4
@@ -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 ))
xen/include/xen/bitmap.h +0 -3
@@ -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,
Signature · 1 line
2.11.0
Quoted 4 lines · Jane Malalane
Functions made static as there are no external callers.
Suggested-by Andrew Cooper <[email protected]>Signed-off-by Jane Malalane <[email protected]>
Acked-by Jan Beulich <[email protected]>