The patch titled Subject: printk: remove static from printk_ variables has been added to the -mm tree. Its filename is printk-remove-static-from-printk_-variables.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Joe Perches <joe@xxxxxxxxxxx> Subject: printk: remove static from printk_ variables Allow a separation of functions and variables into multiple files. Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> Cc: Kay Sievers <kay@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/printk/printk.c | 46 +++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff -puN kernel/printk/printk.c~printk-remove-static-from-printk_-variables kernel/printk/printk.c --- a/kernel/printk/printk.c~printk-remove-static-from-printk_-variables +++ a/kernel/printk/printk.c @@ -208,7 +208,7 @@ struct printk_log { * The printk_logbuf_lock protects kmsg buffer, indices, counters. It is also * used in interesting ways to provide interlocking in console_unlock(); */ -static DEFINE_RAW_SPINLOCK(printk_logbuf_lock); +DEFINE_RAW_SPINLOCK(printk_logbuf_lock); #ifdef CONFIG_PRINTK /* the next printk record to read by syslog(READ) or /proc/kmsg */ @@ -218,12 +218,12 @@ static enum printk_log_flags syslog_prev static size_t syslog_partial; /* index and sequence number of the first record stored in the buffer */ -static u64 printk_log_first_seq; -static u32 printk_log_first_idx; +u64 printk_log_first_seq; +u32 printk_log_first_idx; /* index and sequence number of the next record to store in the buffer */ -static u64 printk_log_next_seq; -static u32 printk_log_next_idx; +u64 printk_log_next_seq; +u32 printk_log_next_idx; /* the next printk record to write to the console */ static u64 console_seq; @@ -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 printk_log_clear_seq; -static u32 printk_log_clear_idx; +u64 printk_log_clear_seq; +u32 printk_log_clear_idx; #define PREFIX_MAX 32 #define LOG_LINE_MAX 1024 - PREFIX_MAX @@ -244,27 +244,27 @@ static u32 printk_log_clear_idx; #define LOG_ALIGN __alignof__(struct printk_log) #endif #define __PRINTK_LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT) -static char __printk_log_buf[__PRINTK_LOG_BUF_LEN] __aligned(LOG_ALIGN); -static char *printk_log_buf = __printk_log_buf; -static u32 printk_log_buf_len = __PRINTK_LOG_BUF_LEN; +char __printk_log_buf[__PRINTK_LOG_BUF_LEN] __aligned(LOG_ALIGN); +char *printk_log_buf = __printk_log_buf; +u32 printk_log_buf_len = __PRINTK_LOG_BUF_LEN; /* cpu currently holding printk_logbuf_lock */ static volatile unsigned int logbuf_cpu = UINT_MAX; /* human readable text of the record */ -static char *printk_log_text(const struct printk_log *msg) +char *printk_log_text(const struct printk_log *msg) { return (char *)msg + sizeof(struct printk_log); } /* optional key/value pair dictionary attached to the record */ -static char *printk_log_dict(const struct printk_log *msg) +char *printk_log_dict(const struct printk_log *msg) { return (char *)msg + sizeof(struct printk_log) + msg->text_len; } /* get record by index; idx must point to valid msg */ -static struct printk_log *printk_log_from_idx(u32 idx) +struct printk_log *printk_log_from_idx(u32 idx) { struct printk_log *msg = (struct printk_log *)(printk_log_buf + idx); @@ -278,7 +278,7 @@ static struct printk_log *printk_log_fro } /* get next record; idx must point to valid msg */ -static u32 printk_log_next(u32 idx) +u32 printk_log_next(u32 idx) { struct printk_log *msg = (struct printk_log *)(printk_log_buf + idx); @@ -296,10 +296,10 @@ static u32 printk_log_next(u32 idx) } /* insert record into the buffer, discard old ones, update heads */ -static void printk_log_store(int facility, int level, - enum printk_log_flags flags, u64 ts_nsec, - const char *dict, u16 dict_len, - const char *text, u16 text_len) +void printk_log_store(int facility, int level, + enum printk_log_flags flags, u64 ts_nsec, + const char *dict, u16 dict_len, + const char *text, u16 text_len) { struct printk_log *msg; u32 size, pad_len; @@ -1690,9 +1690,9 @@ static u32 syslog_idx; static u64 console_seq; static u32 console_idx; static enum printk_log_flags syslog_prev; -static u64 printk_log_first_seq; -static u32 printk_log_first_idx; -static u64 printk_log_next_seq; +u64 printk_log_first_seq; +u32 printk_log_first_idx; +u64 printk_log_next_seq; static enum printk_log_flags console_prev; static struct cont { size_t len; @@ -1700,8 +1700,8 @@ static struct cont { u8 level; bool flushed:1; } cont; -static struct printk_log *printk_log_from_idx(u32 idx) { return NULL; } -static u32 printk_log_next(u32 idx) { return 0; } +struct printk_log *printk_log_from_idx(u32 idx) { return NULL; } +u32 printk_log_next(u32 idx) { return 0; } static void call_console_drivers(int level, const char *text, size_t len) {} static size_t msg_print_text(const struct printk_log *msg, enum printk_log_flags prev, _ Patches currently in -mm which might be from joe@xxxxxxxxxxx are printk-move-to-separate-directory-for-easier-modification.patch printk-add-console_cmdlineh.patch printk-move-braille-console-support-into-separate-braille-files.patch printk-use-pointer-for-console_cmdline-indexing.patch printk-rename-struct-log-to-struct-printk_log.patch printk-rename-log_buf-and-__log_buf_len.patch printk-rename-log_first-and-log_next-variables.patch printk-rename-log_foo-variables-and-functions.patch printk-rename-enum-log_flags-to-printk_log_flags.patch printk-rename-log_wait-to-printk_log_wait.patch printk-rename-logbuf_lock-to-printk_logbuf_lock.patch printk-rename-clear_seq-and-clear_idx-variables.patch printk-remove-static-from-printk_-variables.patch printk-rename-log_align-to-printk_log_align.patch printk-add-and-use-printk_logh.patch printk-add-printk_logc.patch printk-make-wait_queue_head_t-printk_log_wait-extern.patch printk-rename-and-move-2-defines-to-printk_logh.patch printk-move-devkmsg-bits-to-separate-file.patch printk-prefix-print_time-and-msg_print_text-with-printk_.patch printk-move-functions-printk_print_time-and-printk_msg_print_text.patch printk-add-printk_syslogc-and-h.patch printk-move-kmsg_dump-functions-to-separate-file.patch maintainers-networking-drivers-matches-too-much.patch checkpatch-improve-network-block-comment-style-checking.patch kstrto-add-documentation.patch simple_strto-annotate-function-as-obsolete.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html