Staging: android: logger: fix up remaining checkpatch warnings
This cleans up the last of the checkpatch warnings in the android logger driver. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
* mutex 'mutex'.
|
* mutex 'mutex'.
|
||||||
*/
|
*/
|
||||||
struct logger_log {
|
struct logger_log {
|
||||||
unsigned char * buffer; /* the ring buffer itself */
|
unsigned char *buffer;/* the ring buffer itself */
|
||||||
struct miscdevice misc; /* misc device representing the log */
|
struct miscdevice misc; /* misc device representing the log */
|
||||||
wait_queue_head_t wq; /* wait queue for readers */
|
wait_queue_head_t wq; /* wait queue for readers */
|
||||||
struct list_head readers; /* this log's readers */
|
struct list_head readers; /* this log's readers */
|
||||||
@@ -52,7 +52,7 @@ struct logger_log {
|
|||||||
* reference counting. The structure is protected by log->mutex.
|
* reference counting. The structure is protected by log->mutex.
|
||||||
*/
|
*/
|
||||||
struct logger_reader {
|
struct logger_reader {
|
||||||
struct logger_log * log; /* associated log */
|
struct logger_log *log; /* associated log */
|
||||||
struct list_head list; /* entry in logger_log's list */
|
struct list_head list; /* entry in logger_log's list */
|
||||||
size_t r_off; /* current read head offset */
|
size_t r_off; /* current read head offset */
|
||||||
};
|
};
|
||||||
@@ -74,7 +74,7 @@ struct logger_reader {
|
|||||||
* file->logger_log. Thus what file->private_data points at depends on whether
|
* file->logger_log. Thus what file->private_data points at depends on whether
|
||||||
* or not the file was opened for reading. This function hides that dirtiness.
|
* or not the file was opened for reading. This function hides that dirtiness.
|
||||||
*/
|
*/
|
||||||
static inline struct logger_log * file_get_log(struct file *file)
|
static inline struct logger_log *file_get_log(struct file *file)
|
||||||
{
|
{
|
||||||
if (file->f_mode & FMODE_READ) {
|
if (file->f_mode & FMODE_READ) {
|
||||||
struct logger_reader *reader = file->private_data;
|
struct logger_reader *reader = file->private_data;
|
||||||
@@ -379,7 +379,7 @@ ssize_t logger_aio_write(struct kiocb *iocb, const struct iovec *iov,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct logger_log * get_log_from_minor(int);
|
static struct logger_log *get_log_from_minor(int);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* logger_open - the log's open() file operation
|
* logger_open - the log's open() file operation
|
||||||
@@ -519,7 +519,7 @@ static long logger_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations logger_fops = {
|
static const struct file_operations logger_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = logger_read,
|
.read = logger_read,
|
||||||
.aio_write = logger_aio_write,
|
.aio_write = logger_aio_write,
|
||||||
@@ -557,7 +557,7 @@ DEFINE_LOGGER_DEVICE(log_main, LOGGER_LOG_MAIN, 64*1024)
|
|||||||
DEFINE_LOGGER_DEVICE(log_events, LOGGER_LOG_EVENTS, 256*1024)
|
DEFINE_LOGGER_DEVICE(log_events, LOGGER_LOG_EVENTS, 256*1024)
|
||||||
DEFINE_LOGGER_DEVICE(log_radio, LOGGER_LOG_RADIO, 64*1024)
|
DEFINE_LOGGER_DEVICE(log_radio, LOGGER_LOG_RADIO, 64*1024)
|
||||||
|
|
||||||
static struct logger_log * get_log_from_minor(int minor)
|
static struct logger_log *get_log_from_minor(int minor)
|
||||||
{
|
{
|
||||||
if (log_main.misc.minor == minor)
|
if (log_main.misc.minor == minor)
|
||||||
return &log_main;
|
return &log_main;
|
||||||
|
Reference in New Issue
Block a user