linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Kay Sievers <kay@vrfy.org>, linux-kernel@vger.kernel.org
Subject: [PATCH V2 10/23] printk: Rename log_wait to printk_log_wait
Date: Wed, 24 Oct 2012 20:43:45 -0700	[thread overview]
Message-ID: <16e446e9f8a8f13ad0c45db05c5af174939e88ae.1351135989.git.joe@perches.com> (raw)
In-Reply-To: <cover.1351135988.git.joe@perches.com>

Make this generic variable more specific to the printk
subsystem to allow this variable to be used without
a specific extern.

Also update fs/proc/kmsg.c as it uses log_wait.

Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/proc/kmsg.c         |    4 ++--
 kernel/printk/printk.c |   12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/proc/kmsg.c b/fs/proc/kmsg.c
index bd4b5a7..16f2c85 100644
--- a/fs/proc/kmsg.c
+++ b/fs/proc/kmsg.c
@@ -17,7 +17,7 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
-extern wait_queue_head_t log_wait;
+extern wait_queue_head_t printk_log_wait;
 
 static int kmsg_open(struct inode * inode, struct file * file)
 {
@@ -41,7 +41,7 @@ static ssize_t kmsg_read(struct file *file, char __user *buf,
 
 static unsigned int kmsg_poll(struct file *file, poll_table *wait)
 {
-	poll_wait(file, &log_wait, wait);
+	poll_wait(file, &printk_log_wait, wait);
 	if (do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_FILE))
 		return POLLIN | POLLRDNORM;
 	return 0;
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 341f2d9..c87472b 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -63,7 +63,7 @@ void asmlinkage __attribute__((weak)) early_printk(const char *fmt, ...)
 #define MINIMUM_CONSOLE_LOGLEVEL 1 /* Minimum loglevel we let people use */
 #define DEFAULT_CONSOLE_LOGLEVEL 7 /* anything MORE serious than KERN_DEBUG */
 
-DECLARE_WAIT_QUEUE_HEAD(log_wait);
+DECLARE_WAIT_QUEUE_HEAD(printk_log_wait);
 
 int console_printk[4] = {
 	DEFAULT_CONSOLE_LOGLEVEL,	/* console_loglevel */
@@ -447,7 +447,7 @@ static ssize_t devkmsg_read(struct file *file, char __user *buf,
 		}
 
 		raw_spin_unlock_irq(&logbuf_lock);
-		ret = wait_event_interruptible(log_wait,
+		ret = wait_event_interruptible(printk_log_wait,
 					       user->seq != printk_log_next_seq);
 		if (ret)
 			goto out;
@@ -589,7 +589,7 @@ static unsigned int devkmsg_poll(struct file *file, poll_table *wait)
 	if (!user)
 		return POLLERR|POLLNVAL;
 
-	poll_wait(file, &log_wait, wait);
+	poll_wait(file, &printk_log_wait, wait);
 
 	raw_spin_lock_irq(&logbuf_lock);
 	if (user->seq < printk_log_next_seq) {
@@ -1122,7 +1122,7 @@ int do_syslog(int type, char __user *buf, int len, bool from_file)
 			error = -EFAULT;
 			goto out;
 		}
-		error = wait_event_interruptible(log_wait,
+		error = wait_event_interruptible(printk_log_wait,
 						 syslog_seq != printk_log_next_seq);
 		if (error)
 			goto out;
@@ -1948,7 +1948,7 @@ void printk_tick(void)
 			printk(KERN_WARNING "[sched_delayed] %s", buf);
 		}
 		if (pending & PRINTK_PENDING_WAKEUP)
-			wake_up_interruptible(&log_wait);
+			wake_up_interruptible(&printk_log_wait);
 	}
 }
 
@@ -1961,7 +1961,7 @@ int printk_needs_cpu(int cpu)
 
 void wake_up_klogd(void)
 {
-	if (waitqueue_active(&log_wait))
+	if (waitqueue_active(&printk_log_wait))
 		this_cpu_or(printk_pending, PRINTK_PENDING_WAKEUP);
 }
 
-- 
1.7.8.112.g3fd21


  parent reply	other threads:[~2012-10-25  3:45 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25  3:43 [PATCH V2 00/23] printk: refactoring Joe Perches
2012-10-25  3:43 ` [PATCH V2 01/23] printk: Move to separate directory for easier modification Joe Perches
2012-10-25  3:43 ` [PATCH V2 02/23] printk: Add console_cmdline.h Joe Perches
2012-10-25  3:43 ` [PATCH V2 03/23] printk: Move braille console support into separate braille.[ch] files Joe Perches
2012-10-25  3:43 ` [PATCH V2 04/23] printk: Use pointer for console_cmdline indexing Joe Perches
2012-10-25  3:43 ` [PATCH V2 05/23] printk: rename struct log to struct printk_log Joe Perches
2012-10-25  3:43 ` [PATCH V2 06/23] printk: Rename log_buf and __LOG_BUF_LEN Joe Perches
2012-10-25  3:43 ` [PATCH V2 07/23] printk: Rename log_first and log_next variables Joe Perches
2012-10-25  3:43 ` [PATCH V2 08/23] printk: Rename log_<foo> variables and functions Joe Perches
2012-10-25  3:43 ` [PATCH V2 09/23] printk: Rename enum log_flags to printk_log_flags Joe Perches
2012-10-25  3:43 ` Joe Perches [this message]
2012-10-25  3:43 ` [PATCH V2 11/23] printk: Rename logbuf_lock to printk_logbuf_lock Joe Perches
2012-10-25  3:43 ` [PATCH V2 12/23] printk: Rename clear_seq and clear_idx variables Joe Perches
2012-10-25  3:43 ` [PATCH V2 13/23] printk: Remove static from printk_ variables Joe Perches
2012-10-25  3:43 ` [PATCH V2 14/23] printk: Rename LOG_ALIGN to PRINTK_LOG_ALIGN Joe Perches
2012-10-25  3:43 ` [PATCH V2 15/23] printk: Add and use printk_log.h Joe Perches
2012-10-25  3:43 ` [PATCH V2 16/23] printk: Add printk_log.c Joe Perches
2012-10-25  3:43 ` [PATCH V2 17/23] printk: Make wait_queue_head_t printk_log_wait extern Joe Perches
2012-10-25  3:43 ` [PATCH V2 18/23] printk: Rename and move 2 #defines to printk_log.h Joe Perches
2012-10-25  3:43 ` [PATCH V2 19/23] printk: Move devkmsg bits to separate file Joe Perches
2012-10-25  3:43 ` [PATCH V2 20/23] printk: Prefix print_time and msg_print_text with printk_ Joe Perches
2012-10-25  3:43 ` [PATCH V2 21/23] printk: Move functions printk_print_time and printk_msg_print_text Joe Perches
2012-10-25  3:43 ` [PATCH V2 22/23] printk: Add printk_syslog.c and .h Joe Perches
2012-10-25  3:43 ` [PATCH V2 23/23] printk: Move kmsg_dump functions to separate file Joe Perches
     [not found] ` <1351864140.3537.1.camel@joe-AO722>
2012-11-12 22:54   ` [PATCH V2 00/23] printk: refactoring Joe Perches
2012-11-12 23:26     ` Andrew Morton
2012-11-12 23:30       ` Joe Perches
2012-11-29 22:08       ` Joe Perches
2012-11-29 22:21         ` Andrew Morton
2012-11-29 22:46           ` Joe Perches
2012-11-29 22:53             ` Kay Sievers
2012-11-30 10:20               ` "Jan H. Schönherr"

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16e446e9f8a8f13ad0c45db05c5af174939e88ae.1351135989.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).