[PATCH 0/6] add generic round_up_pow2() macro

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

 



Randy.Dunlap wrote:
> >+#define ALIGN_DATA_SIZE(size)       ((size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))                      
>                                                                                                        
> ISTM that we need a generic round_up() function or macro in kernel.h.                                  
>                                                                                                        
> a.out.h, reiserfs_fs.h, and ufs_fs.h all have their own round-up                                       
> macros.                                                                                                
 
I've found many more places in the kernel that use their own functions for
doing this. These patches are the beginning of an attempt to clean these
up.

The first patch adds a generic round_up_pow2() macro to kernel.h. The
remaining patches modify a few files to make use of the new macro.
Comments welcome.

Thanks,
        
Nick
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux