Merge branch 'rework/misc-cleanups' into for-linus
[linux-2.6-microblaze.git] / kernel / printk / printk.c
index 80eb791..95689ec 100644 (file)
@@ -71,6 +71,8 @@ EXPORT_SYMBOL_GPL(console_printk);
 atomic_t ignore_console_lock_warning __read_mostly = ATOMIC_INIT(0);
 EXPORT_SYMBOL(ignore_console_lock_warning);
 
+EXPORT_TRACEPOINT_SYMBOL_GPL(console);
+
 /*
  * Low level drivers may need that to know if they can schedule in
  * their unblank() callback or not. So let's export it.
@@ -89,7 +91,7 @@ static DEFINE_MUTEX(console_mutex);
  * console_sem protects updates to console->seq
  * and also provides serialization for console printing.
  */
-static DEFINE_SEMAPHORE(console_sem);
+static DEFINE_SEMAPHORE(console_sem, 1);
 HLIST_HEAD(console_list);
 EXPORT_SYMBOL_GPL(console_list);
 DEFINE_STATIC_SRCU(console_srcu);
@@ -526,7 +528,7 @@ static u64 latched_seq_read_nolock(struct latched_seq *ls)
                seq = raw_read_seqcount_latch(&ls->latch);
                idx = seq & 0x1;
                val = ls->val[idx];
-       } while (read_seqcount_latch_retry(&ls->latch, seq));
+       } while (raw_read_seqcount_latch_retry(&ls->latch, seq));
 
        return val;
 }
@@ -1667,7 +1669,6 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
 
        prb_rec_init_rd(&r, &info, text, PRINTK_MESSAGE_MAX);
 
-       len = 0;
        prb_for_each_record(seq, prb, seq, &r) {
                int textlen;
 
@@ -4192,7 +4193,6 @@ bool kmsg_dump_get_buffer(struct kmsg_dump_iter *iter, bool syslog,
 
        prb_rec_init_rd(&r, &info, buf, size);
 
-       len = 0;
        prb_for_each_record(seq, prb, seq, &r) {
                if (r.info->seq >= iter->next_seq)
                        break;