linux/kernel.h: Add ALIGN_DOWN macro
Few parts of kernel define their own macro for aligning down so provide a common define for this, with the same usage and assumptions as existing ALIGN. Convert also three existing implementations to this one. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:

committed by
Herbert Xu

parent
7e207d8550
commit
ed067d4a85
@@ -92,6 +92,6 @@ struct dlfb_data {
|
||||
|
||||
/* remove these once align.h patch is taken into kernel */
|
||||
#define DL_ALIGN_UP(x, a) ALIGN(x, a)
|
||||
#define DL_ALIGN_DOWN(x, a) ALIGN(x-(a-1), a)
|
||||
#define DL_ALIGN_DOWN(x, a) ALIGN_DOWN(x, a)
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user