staging: android: Correct coding style in logger.c

Correct intent and missing space

Signed-off-by: Guillaume Vercoutere <gvercoutere@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Guillaume Vercoutere 2015-01-05 15:24:06 +01:00 committed by Greg Kroah-Hartman
parent 0541cdf585
commit ddc00b9825

View file

@ -63,7 +63,6 @@ struct logger_log {
static LIST_HEAD(log_list);
/**
* struct logger_reader - a logging device open for reading
* @log: The associated log
@ -89,7 +88,6 @@ static size_t logger_offset(struct logger_log *log, size_t n)
return n & (log->size - 1);
}
/*
* file_get_log - Given a file structure, return the associated log
*
@ -122,13 +120,14 @@ static inline struct logger_log *file_get_log(struct file *file)
* the log entry spans the end and beginning of the circular buffer.
*/
static struct logger_entry *get_entry_header(struct logger_log *log,
size_t off, struct logger_entry *scratch)
size_t off,
struct logger_entry *scratch)
{
size_t len = min(sizeof(struct logger_entry), log->size - off);
if (len != sizeof(struct logger_entry)) {
memcpy(((void *) scratch), log->buffer + off, len);
memcpy(((void *) scratch) + len, log->buffer,
memcpy(((void *)scratch), log->buffer + off, len);
memcpy(((void *)scratch) + len, log->buffer,
sizeof(struct logger_entry) - len);
return scratch;
}
@ -530,8 +529,9 @@ static int logger_open(struct inode *inode, struct file *file)
mutex_unlock(&log->mutex);
file->private_data = reader;
} else
} else {
file->private_data = log;
}
return 0;
}
@ -611,7 +611,7 @@ static long logger_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
struct logger_log *log = file_get_log(file);
struct logger_reader *reader;
long ret = -EINVAL;
void __user *argp = (void __user *) arg;
void __user *argp = (void __user *)arg;
mutex_lock(&log->mutex);
@ -746,7 +746,7 @@ static int __init create_log(char *log_name, int size)
}
pr_info("created %luK log '%s'\n",
(unsigned long) log->size >> 10, log->misc.name);
(unsigned long)log->size >> 10, log->misc.name);
return 0;
@ -799,7 +799,6 @@ static void __exit logger_exit(void)
}
}
device_initcall(logger_init);
module_exit(logger_exit);