Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1525dccb authored by Milind Arun Choudhary's avatar Milind Arun Choudhary Committed by Linus Torvalds
Browse files

ROUND_UP macro cleanup in fs/smbfs/request.c



ROUND_UP macro cleanup use ALIGN

Signed-off-by: default avatarMilind Arun Choudhary <milindchoudhary@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 022a1692
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
 *  Please add a note about your changes to smbfs in the ChangeLog file.
 */

#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/slab.h>
@@ -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;