lkml.org 
[lkml]   [2005]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[PATCH 0/6] add generic round_up_pow2() macro
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-08 02:47    [W:0.110 / U:0.240 seconds]
©2003-2014 Jasper Spaans. Advertise on this site