lkml.org 
[lkml]   [2010]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] drivers: dream: Codestyle fix
On Tue, Feb 09, 2010 at 11:59:07PM +0100, Jochen Maes wrote:
> Fixed Codestyle issues
>
> Signed-off-by: Jochen Maes <jochen.maes@sejo.be>
> ---
> drivers/staging/dream/pmem.c | 26 ++++++++++++--------------
> 1 files changed, 12 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/staging/dream/pmem.c b/drivers/staging/dream/pmem.c
> index def6468..ec4e7d1 100644
> --- a/drivers/staging/dream/pmem.c
> +++ b/drivers/staging/dream/pmem.c
> @@ -37,17 +37,17 @@
> * the file should not be released until put_pmem_file is called */
> #define PMEM_FLAGS_BUSY 0x1
> /* indicates that this is a suballocation of a larger master range */
> -#define PMEM_FLAGS_CONNECTED 0x1 << 1
> +#define PMEM_FLAGS_CONNECTED { 0x1 << 1 }

Shouldn't this be using a ( ) and not { } ?

> /* indicates this is a master and not a sub allocation and that it is mmaped */
> -#define PMEM_FLAGS_MASTERMAP 0x1 << 2
> +#define PMEM_FLAGS_MASTERMAP { 0x1 << 2 }
> /* submap and unsubmap flags indicate:
> * 00: subregion has never been mmaped
> * 10: subregion has been mmaped, reference to the mm was taken
> * 11: subretion has ben released, refernece to the mm still held
> * 01: subretion has been released, reference to the mm has been released
> */
> -#define PMEM_FLAGS_SUBMAP 0x1 << 3
> -#define PMEM_FLAGS_UNSUBMAP 0x1 << 4
> +#define PMEM_FLAGS_SUBMAP { 0x1 << 3 }
> +#define PMEM_FLAGS_UNSUBMAP { 0x1 << 4 }

Same for these.

> @@ -152,7 +152,7 @@ struct pmem_info {
> static struct pmem_info pmem[PMEM_MAX_DEVICES];
> static int id_count;
>
> -#define PMEM_IS_FREE(id, index) !(pmem[id].bitmap[index].allocated)
> +#define PMEM_IS_FREE(id, index) { !(pmem[id].bitmap[index].allocated) }

And this.

care to fix this up and resend the patch?

thanks,

greg k-h


\
 
 \ /
  Last update: 2010-02-10 00:11    [W:2.303 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site