]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - lib/bitmap.c
Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[mirror_ubuntu-hirsute-kernel.git] / lib / bitmap.c
index 730969c681cbaf6228e5f8a78bd56e3e547b7122..2fd07f6df0b85e417f340576f530878a9d6ddcfc 100644 (file)
@@ -1152,14 +1152,10 @@ EXPORT_SYMBOL(bitmap_free);
  *     @buf: array of u32 (in host byte order), the source bitmap
  *     @nbits: number of bits in @bitmap
  */
-void bitmap_from_arr32(unsigned long *bitmap, const u32 *buf,
-                                               unsigned int nbits)
+void bitmap_from_arr32(unsigned long *bitmap, const u32 *buf, unsigned int nbits)
 {
        unsigned int i, halfwords;
 
-       if (!nbits)
-               return;
-
        halfwords = DIV_ROUND_UP(nbits, 32);
        for (i = 0; i < halfwords; i++) {
                bitmap[i/2] = (unsigned long) buf[i];
@@ -1183,9 +1179,6 @@ void bitmap_to_arr32(u32 *buf, const unsigned long *bitmap, unsigned int nbits)
 {
        unsigned int i, halfwords;
 
-       if (!nbits)
-               return;
-
        halfwords = DIV_ROUND_UP(nbits, 32);
        for (i = 0; i < halfwords; i++) {
                buf[i] = (u32) (bitmap[i/2] & UINT_MAX);