From: Seunghun Lee Date: Wed, 30 Apr 2014 16:30:23 +0000 (+0900) Subject: staging: android: fix missing a blank line after declarations X-Git-Tag: accepted/tizen/unified/20211126.111914~15^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2e4782b98feb431d0a7301d38942d7503b879d6;p=platform%2Fkernel%2Flinux-tizen-modules-source.git staging: android: fix missing a blank line after declarations This patch fixes "Missing a blank line after declarations" warnings. Change-Id: I67708f8839f3a6d7ab26782ab2f0e4574325ff65 Signed-off-by: Seunghun Lee Signed-off-by: Greg Kroah-Hartman [ Pick only changes in logger.[ch] while moving code out of tree ] Signed-off-by: Karol Lewandowski --- diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c index d42f578..2772e01 100644 --- a/drivers/staging/android/logger.c +++ b/drivers/staging/android/logger.c @@ -108,6 +108,7 @@ static inline struct logger_log *file_get_log(struct file *file) { if (file->f_mode & FMODE_READ) { struct logger_reader *reader = file->private_data; + return reader->log; } else return file->private_data; @@ -124,6 +125,7 @@ static struct logger_entry *get_entry_header(struct logger_log *log, 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, @@ -642,6 +644,7 @@ static unsigned int logger_poll(struct file *file, poll_table *wait) static long logger_set_version(struct logger_reader *reader, void __user *arg) { int version; + if (copy_from_user(&version, arg, sizeof(int))) return -EFAULT;