Commit eb450e89 authored by Chihau Chau's avatar Chihau Chau Committed by Greg Kroah-Hartman

Staging: dream: pmem: fix some code style issues

This fixes some code style issues like prohibited spaces after that open
parenthesis '(' and before that close parenthesis ')', and lines over 80
characters.
Signed-off-by: default avatarChihau Chau <chihau@gmail.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 97dcc7c6
...@@ -38,17 +38,17 @@ ...@@ -38,17 +38,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 {
...@@ -153,7 +153,7 @@ struct pmem_info { ...@@ -153,7 +153,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)))
...@@ -845,8 +845,8 @@ static int pmem_connect(unsigned long connect, struct file *file) ...@@ -845,8 +845,8 @@ 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(KERN_INFO "pmem: file is already mapped but doesn't match this" printk(KERN_INFO "pmem: file is already mapped but doesn't "
" src_file!\n"); "match this src_file!\n");
ret = -EINVAL; ret = -EINVAL;
goto err_bad_file; goto err_bad_file;
} }
...@@ -935,8 +935,8 @@ int pmem_remap(struct pmem_region *region, struct file *file, ...@@ -935,8 +935,8 @@ 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(KERN_DEBUG "pmem: request for unaligned pmem suballocation " printk(KERN_DEBUG "pmem: request for unaligned pmem "
"%lx %lx\n", region->offset, region->len); "suballocation %lx %lx\n", region->offset, region->len);
#endif #endif
return -EINVAL; return -EINVAL;
} }
...@@ -1086,8 +1086,8 @@ static long pmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -1086,8 +1086,8 @@ static long pmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
region.offset = pmem_start_addr(id, data); region.offset = pmem_start_addr(id, data);
region.len = pmem_len(id, data); region.len = pmem_len(id, data);
} }
printk(KERN_INFO "pmem: request for physical address of pmem region " printk(KERN_INFO "pmem: request for physical address "
"from process %d.\n", current->pid); "of pmem region from process %d.\n", current->pid);
if (copy_to_user((void __user *)arg, &region, if (copy_to_user((void __user *)arg, &region,
sizeof(struct pmem_region))) sizeof(struct pmem_region)))
return -EFAULT; return -EFAULT;
......
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