[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <01595915db3e8d6a5d1b2609a5a0a54f683c0249.1351135989.git.joe@perches.com>
Date: Wed, 24 Oct 2012 20:43:47 -0700
From: Joe Perches <joe@...ches.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Kay Sievers <kay@...y.org>, linux-kernel@...r.kernel.org
Subject: [PATCH V2 12/23] printk: Rename clear_seq and clear_idx variables
Make these variables more specific to the printk log subsystem
adding prefix printk_log_. This allows them to become non-static.
Signed-off-by: Joe Perches <joe@...ches.com>
---
kernel/printk/printk.c | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 709472f..3785ac4 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -231,8 +231,8 @@ static u32 console_idx;
static enum printk_log_flags console_prev;
/* the next printk record to read after the last 'clear' command */
-static u64 clear_seq;
-static u32 clear_idx;
+static u64 printk_log_clear_seq;
+static u32 printk_log_clear_idx;
#define PREFIX_MAX 32
#define LOG_LINE_MAX 1024 - PREFIX_MAX
@@ -566,8 +566,8 @@ static loff_t devkmsg_llseek(struct file *file, loff_t offset, int whence)
* like issued by 'dmesg -c'. Reading /dev/kmsg itself
* changes no global state, and does not clear anything.
*/
- user->idx = clear_idx;
- user->seq = clear_seq;
+ user->idx = printk_log_clear_idx;
+ user->seq = printk_log_clear_seq;
break;
case SEEK_END:
/* after the last record */
@@ -1012,18 +1012,18 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
u32 idx;
enum printk_log_flags prev;
- if (clear_seq < printk_log_first_seq) {
+ if (printk_log_clear_seq < printk_log_first_seq) {
/* messages are gone, move to first available one */
- clear_seq = printk_log_first_seq;
- clear_idx = printk_log_first_idx;
+ printk_log_clear_seq = printk_log_first_seq;
+ printk_log_clear_idx = printk_log_first_idx;
}
/*
* Find first record that fits, including all following records,
* into the user-provided buffer for this dump.
*/
- seq = clear_seq;
- idx = clear_idx;
+ seq = printk_log_clear_seq;
+ idx = printk_log_clear_idx;
prev = 0;
while (seq < printk_log_next_seq) {
struct printk_log *msg = printk_log_from_idx(idx);
@@ -1035,8 +1035,8 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
}
/* move first record forward until length fits into the buffer */
- seq = clear_seq;
- idx = clear_idx;
+ seq = printk_log_clear_seq;
+ idx = printk_log_clear_idx;
prev = 0;
while (len > size && seq < printk_log_next_seq) {
struct printk_log *msg = printk_log_from_idx(idx);
@@ -1083,8 +1083,8 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
}
if (clear) {
- clear_seq = printk_log_next_seq;
- clear_idx = printk_log_next_idx;
+ printk_log_clear_seq = printk_log_next_seq;
+ printk_log_clear_idx = printk_log_next_idx;
}
raw_spin_unlock_irq(&printk_logbuf_lock);
@@ -2566,8 +2566,8 @@ void kmsg_dump(enum kmsg_dump_reason reason)
dumper->active = true;
raw_spin_lock_irqsave(&printk_logbuf_lock, flags);
- dumper->cur_seq = clear_seq;
- dumper->cur_idx = clear_idx;
+ dumper->cur_seq = printk_log_clear_seq;
+ dumper->cur_idx = printk_log_clear_idx;
dumper->next_seq = printk_log_next_seq;
dumper->next_idx = printk_log_next_idx;
raw_spin_unlock_irqrestore(&printk_logbuf_lock, flags);
@@ -2774,8 +2774,8 @@ EXPORT_SYMBOL_GPL(kmsg_dump_get_buffer);
*/
void kmsg_dump_rewind_nolock(struct kmsg_dumper *dumper)
{
- dumper->cur_seq = clear_seq;
- dumper->cur_idx = clear_idx;
+ dumper->cur_seq = printk_log_clear_seq;
+ dumper->cur_idx = printk_log_clear_idx;
dumper->next_seq = printk_log_next_seq;
dumper->next_idx = printk_log_next_idx;
}
--
1.7.8.112.g3fd21
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists