[PATCH 0/6] add generic round_up_pow2() macro
From: Nick Wilson
Date: Thu Apr 07 2005 - 19:45:33 EST
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/