From mboxrd@z Thu Jan 1 00:00:00 1970 From: Milind Arun Choudhary Subject: [KJ][PATCH]ROUND_UP macro cleanup in fs/smbfs/request.c Date: Thu, 5 Apr 2007 20:14:20 +0530 Message-ID: <20070405144420.GA10696@arun.site> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org To: kernel-janitors@lists.osdl.org, Linux Filesystems Return-path: Received: from ug-out-1314.google.com ([66.249.92.171]:37394 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1767014AbXDEOnC (ORCPT ); Thu, 5 Apr 2007 10:43:02 -0400 Received: by ug-out-1314.google.com with SMTP id 44so991846uga for ; Thu, 05 Apr 2007 07:43:00 -0700 (PDT) Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org ROUND_UP macro cleanup use ALIGN Signed-off-by: Milind Arun Choudhary --- request.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c index 723f7c6..c288fbe 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; -- Milind Arun Choudhary