Commit df16b962 authored by Jochen Maes's avatar Jochen Maes Committed by Greg Kroah-Hartman

staging: dream: Codestyle fix

Fixed Codestyle issues
Signed-off-by: default avatarJochen Maes <jochen.maes@sejo.be>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 326bdc65
...@@ -37,17 +37,17 @@ ...@@ -37,17 +37,17 @@
* the file should not be released until put_pmem_file is called */ * the file should not be released until put_pmem_file is called */
#define PMEM_FLAGS_BUSY 0x1 #define PMEM_FLAGS_BUSY 0x1
/* indicates that this is a suballocation of a larger master range */ /* indicates that this is a suballocation of a larger master range */
#define PMEM_FLAGS_CONNECTED 0x1 << 1 #define PMEM_FLAGS_CONNECTED ( 0x1 << 1 )
/* indicates this is a master and not a sub allocation and that it is mmaped */ /* 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: /* submap and unsubmap flags indicate:
* 00: subregion has never been mmaped * 00: subregion has never been mmaped
* 10: subregion has been mmaped, reference to the mm was taken * 10: subregion has been mmaped, reference to the mm was taken
* 11: subretion has ben released, refernece to the mm still held * 11: subretion has ben released, refernece to the mm still held
* 01: subretion has been released, reference to the mm has been released * 01: subretion has been released, reference to the mm has been released
*/ */
#define PMEM_FLAGS_SUBMAP 0x1 << 3 #define PMEM_FLAGS_SUBMAP ( 0x1 << 3 )
#define PMEM_FLAGS_UNSUBMAP 0x1 << 4 #define PMEM_FLAGS_UNSUBMAP ( 0x1 << 4 )
struct pmem_data { struct pmem_data {
...@@ -91,7 +91,7 @@ struct pmem_region_node { ...@@ -91,7 +91,7 @@ struct pmem_region_node {
#define PMEM_DEBUG_MSGS 0 #define PMEM_DEBUG_MSGS 0
#if PMEM_DEBUG_MSGS #if PMEM_DEBUG_MSGS
#define DLOG(fmt,args...) \ #define DLOG(fmt, args...) \
do { printk(KERN_INFO "[%s:%s:%d] "fmt, __FILE__, __func__, __LINE__, \ do { printk(KERN_INFO "[%s:%s:%d] "fmt, __FILE__, __func__, __LINE__, \
##args); } \ ##args); } \
while (0) while (0)
...@@ -152,7 +152,7 @@ struct pmem_info { ...@@ -152,7 +152,7 @@ struct pmem_info {
static struct pmem_info pmem[PMEM_MAX_DEVICES]; static struct pmem_info pmem[PMEM_MAX_DEVICES];
static int id_count; 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) )
#define PMEM_ORDER(id, index) pmem[id].bitmap[index].order #define PMEM_ORDER(id, index) pmem[id].bitmap[index].order
#define PMEM_BUDDY_INDEX(id, index) (index ^ (1 << PMEM_ORDER(id, index))) #define PMEM_BUDDY_INDEX(id, index) (index ^ (1 << PMEM_ORDER(id, index)))
#define PMEM_NEXT_INDEX(id, index) (index + (1 << PMEM_ORDER(id, index))) #define PMEM_NEXT_INDEX(id, index) (index + (1 << PMEM_ORDER(id, index)))
...@@ -708,9 +708,8 @@ int get_pmem_addr(struct file *file, unsigned long *start, ...@@ -708,9 +708,8 @@ int get_pmem_addr(struct file *file, unsigned long *start,
struct pmem_data *data; struct pmem_data *data;
int id; int id;
if (!is_pmem_file(file) || !has_allocation(file)) { if (!is_pmem_file(file) || !has_allocation(file))
return -1; return -1;
}
data = (struct pmem_data *)file->private_data; data = (struct pmem_data *)file->private_data;
if (data->index == -1) { if (data->index == -1) {
...@@ -789,9 +788,8 @@ void flush_pmem_file(struct file *file, unsigned long offset, unsigned long len) ...@@ -789,9 +788,8 @@ void flush_pmem_file(struct file *file, unsigned long offset, unsigned long len)
struct list_head *elt; struct list_head *elt;
void *flush_start, *flush_end; void *flush_start, *flush_end;
if (!is_pmem_file(file) || !has_allocation(file)) { if (!is_pmem_file(file) || !has_allocation(file))
return; return;
}
id = get_id(file); id = get_id(file);
data = (struct pmem_data *)file->private_data; data = (struct pmem_data *)file->private_data;
...@@ -833,7 +831,7 @@ static int pmem_connect(unsigned long connect, struct file *file) ...@@ -833,7 +831,7 @@ static int pmem_connect(unsigned long connect, struct file *file)
src_file = fget_light(connect, &put_needed); src_file = fget_light(connect, &put_needed);
DLOG("connect %p to %p\n", file, src_file); DLOG("connect %p to %p\n", file, src_file);
if (!src_file) { if (!src_file) {
printk("pmem: src file not found!\n"); printk(KERN_INFO "pmem: src file not found!\n");
ret = -EINVAL; ret = -EINVAL;
goto err_no_file; goto err_no_file;
} }
...@@ -846,7 +844,7 @@ static int pmem_connect(unsigned long connect, struct file *file) ...@@ -846,7 +844,7 @@ static int pmem_connect(unsigned long connect, struct file *file)
src_data = (struct pmem_data *)src_file->private_data; src_data = (struct pmem_data *)src_file->private_data;
if (has_allocation(file) && (data->index != src_data->index)) { if (has_allocation(file) && (data->index != src_data->index)) {
printk("pmem: file is already mapped but doesn't match this" printk(KERN_INFO "pmem: file is already mapped but doesn't match this"
" src_file!\n"); " src_file!\n");
ret = -EINVAL; ret = -EINVAL;
goto err_bad_file; goto err_bad_file;
...@@ -885,7 +883,7 @@ static int pmem_lock_data_and_mm(struct file *file, struct pmem_data *data, ...@@ -885,7 +883,7 @@ static int pmem_lock_data_and_mm(struct file *file, struct pmem_data *data,
mm = get_task_mm(data->task); mm = get_task_mm(data->task);
if (!mm) { if (!mm) {
#if PMEM_DEBUG #if PMEM_DEBUG
printk("pmem: can't remap task is gone!\n"); printk(KERN_DEBUG "pmem: can't remap task is gone!\n");
#endif #endif
up_read(&data->sem); up_read(&data->sem);
return -1; return -1;
...@@ -936,7 +934,7 @@ int pmem_remap(struct pmem_region *region, struct file *file, ...@@ -936,7 +934,7 @@ int pmem_remap(struct pmem_region *region, struct file *file,
if (unlikely(!PMEM_IS_PAGE_ALIGNED(region->offset) || if (unlikely(!PMEM_IS_PAGE_ALIGNED(region->offset) ||
!PMEM_IS_PAGE_ALIGNED(region->len))) { !PMEM_IS_PAGE_ALIGNED(region->len))) {
#if PMEM_DEBUG #if PMEM_DEBUG
printk("pmem: request for unaligned pmem suballocation " printk(KERN_DEBUG "pmem: request for unaligned pmem suballocation "
"%lx %lx\n", region->offset, region->len); "%lx %lx\n", region->offset, region->len);
#endif #endif
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment