Re: [patch -next] fsl/fman: use the ALIGN() macro

2016-01-06 Thread Dan Carpenter
On Wed, Jan 06, 2016 at 03:27:38PM -0500, David Miller wrote: > From: Dan Carpenter > Date: Wed, 6 Jan 2016 13:03:08 +0300 > > > diff --git a/drivers/net/ethernet/freescale/fman/fman_sp.c > > b/drivers/net/ethernet/freescale/fman/fman_sp.c > > index f9e7aa3..b527da1 100644 > > --- a/drivers/net/

Re: [patch -next] fsl/fman: use the ALIGN() macro

2016-01-06 Thread David Miller
From: Dan Carpenter Date: Wed, 6 Jan 2016 13:03:08 +0300 > diff --git a/drivers/net/ethernet/freescale/fman/fman_sp.c > b/drivers/net/ethernet/freescale/fman/fman_sp.c > index f9e7aa3..b527da1 100644 > --- a/drivers/net/ethernet/freescale/fman/fman_sp.c > +++ b/drivers/net/ethernet/freescale/fma

[patch -next] fsl/fman: use the ALIGN() macro

2016-01-06 Thread Dan Carpenter
The original code works fine but the issue is that static checkers complain about this: ~(u16)(OFFSET_UNITS - 1) In that expression the cast to u16 is a no-op because we cast the value 15 to a u16 but then type promotion rules automatically cast it back to an int and then we do the bitwis