Revert "Revert "printk: remove unused code from kernel/printk.c""
author黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:44:40 +0000 (22:44 +0800)
committer黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:44:40 +0000 (22:44 +0800)
This reverts commit afa82e25d4d6ab6500828cd7cc9d395a9c1e5d69.

kernel/printk.c

index e89b123a2ebbc0c2c2236fbc6e85467c81844b97..a508e2939ac512b9531c5d4e88153e8110623f6f 100644 (file)
@@ -260,45 +260,6 @@ static inline void boot_delay_msec(void)
 }
 #endif
 
-/*
- * Return the number of unread characters in the log buffer.
- */
-static int log_buf_get_len(void)
-{
-       return logged_chars;
-}
-
-/*
- * Copy a range of characters from the log buffer.
- */
-int log_buf_copy(char *dest, int idx, int len)
-{
-       int ret, max;
-       bool took_lock = false;
-
-       if (!oops_in_progress) {
-               spin_lock_irq(&logbuf_lock);
-               took_lock = true;
-       }
-
-       max = log_buf_get_len();
-       if (idx < 0 || idx >= max) {
-               ret = -1;
-       } else {
-               if (len > max)
-                       len = max;
-               ret = len;
-               idx += (log_end - max);
-               while (len-- > 0)
-                       dest[len] = LOG_BUF(idx + len);
-       }
-
-       if (took_lock)
-               spin_unlock_irq(&logbuf_lock);
-
-       return ret;
-}
-
 /*
  * Commands to do_syslog:
  *