From: Milind Arun Choudhary Date: Tue, 8 May 2007 07:29:03 +0000 (-0700) Subject: ROUND_UP macro cleanup in fs/smbfs/request.c X-Git-Tag: v2.6.22-rc1~677 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1525dccbc248b87568f2477f1b2d417b69d418c3;p=linux-2.6-omap-h63xx.git ROUND_UP macro cleanup in fs/smbfs/request.c ROUND_UP macro cleanup use ALIGN Signed-off-by: Milind Arun Choudhary Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c index 723f7c66766..c288fbe7953 100644 --- a/fs/smbfs/request.c +++ b/fs/smbfs/request.c @@ -6,6 +6,7 @@ * Please add a note about your changes to smbfs in the ChangeLog file. */ +#include #include #include #include @@ -22,8 +23,6 @@ /* #define SMB_SLAB_DEBUG (SLAB_RED_ZONE | SLAB_POISON) */ #define SMB_SLAB_DEBUG 0 -#define ROUND_UP(x) (((x)+3) & ~3) - /* cache for request structures */ static struct kmem_cache *req_cachep; @@ -200,8 +199,8 @@ static int smb_setup_trans2request(struct smb_request *req) const int smb_parameters = 15; const int header = SMB_HEADER_LEN + 2 * smb_parameters + 2; - const int oparam = ROUND_UP(header + 3); - const int odata = ROUND_UP(oparam + req->rq_lparm); + const int oparam = ALIGN(header + 3, sizeof(u32)); + const int odata = ALIGN(oparam + req->rq_lparm, sizeof(u32)); const int bcc = (req->rq_data ? odata + req->rq_ldata : oparam + req->rq_lparm) - header;