]> Pileus Git - ~andy/linux/blobdiff - fs/qnx4/bitmap.c
Merge remote branch 'nouveau/for-airlied' into drm-linus
[~andy/linux] / fs / qnx4 / bitmap.c
index 32f5d131a6441c694ba41304fc28a673744365aa..22e0d60e53efbe3072ade881ec69251062df83c9 100644 (file)
 #include <linux/bitops.h>
 #include "qnx4.h"
 
-#if 0
-int qnx4_new_block(struct super_block *sb)
-{
-       return 0;
-}
-#endif  /*  0  */
-
 static void count_bits(register const char *bmPart, register int size,
                       int *const tf)
 {
@@ -35,22 +28,7 @@ static void count_bits(register const char *bmPart, register int size,
        }
        do {
                b = *bmPart++;
-               if ((b & 1) == 0)
-                       tot++;
-               if ((b & 2) == 0)
-                       tot++;
-               if ((b & 4) == 0)
-                       tot++;
-               if ((b & 8) == 0)
-                       tot++;
-               if ((b & 16) == 0)
-                       tot++;
-               if ((b & 32) == 0)
-                       tot++;
-               if ((b & 64) == 0)
-                       tot++;
-               if ((b & 128) == 0)
-                       tot++;
+               tot += 8 - hweight8(b);
                size--;
        } while (size != 0);
        *tf = tot;