[PATCH 3/3] staging: android: struct sizeof coding style in logger.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux