[PATCH 3/3] staging: android: struct sizeof coding style in logger.c
From: Guillaume Vercoutere
Date: Mon Jan 05 2015 - 09:49:26 EST
Replace sizeof struct
Signed-off-by: Guillaume Vercoutere <gvercoutere@xxxxxxxxx>
---
drivers/staging/android/logger.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c
index 72b804e..7e0eab2 100644
--- a/drivers/staging/android/logger.c
+++ b/drivers/staging/android/logger.c
@@ -512,7 +512,7 @@ static int logger_open(struct inode *inode, struct file *file)
if (file->f_mode & FMODE_READ) {
struct logger_reader *reader;
- reader = kmalloc(sizeof(struct logger_reader), GFP_KERNEL);
+ reader = kmalloc(sizeof(*reader), GFP_KERNEL);
if (!reader)
return -ENOMEM;
@@ -710,7 +710,7 @@ static int __init create_log(char *log_name, int size)
if (!buffer)
return -ENOMEM;
- log = kzalloc(sizeof(struct logger_log), GFP_KERNEL);
+ log = kzalloc(sizeof(*log), GFP_KERNEL);
if (!log) {
ret = -ENOMEM;
goto out_free_buffer;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/