Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543170
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] printk: Remove no longer used second struct cont |
| Date | 2016-12-16 02:50 +0100 |
| Message-ID | <sOPON-53T-7@gated-at.bofh.it> (permalink) |
| References | <sOEgG-6fO-13@gated-at.bofh.it> <sOH4S-80J-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On (12/15/16 17:23), Petr Mladek wrote:
> On Thu 2016-12-15 13:53:58, Geert Uytterhoeven wrote:
> > If CONFIG_PRINTK=n:
> >
> > kernel/printk/printk.c:1893: warning: ‘cont’ defined but not used
> >
> > Note that there are actually two different struct cont definitions and
> > objects: the first one is used if CONFIG_PRINTK=y, the second one became
> > unused by removing console_cont_flush().
> >
> > Fixes: 5c2992ee7fd8a29d ("printk: remove console flushing special cases for partial buffered lines")
>
> Great catch. It seems that nobody tried the build without CONFIG_PRINTK
> at that time.
ok... since the patch is a cosmetic tweak... can we add several more
cosmetic changes to it? yes, I know, N things in one patch is "a bad thing",
but those extra changes don't deserve to be in a separate patch.
basically I'm talking about a bunch of 80-cols fixups.
if it's irrelevant then feel free to ignore it.
---
kernel/printk/printk.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index bc2e220ed2b0..d09b4f0537ee 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1194,7 +1194,8 @@ static size_t print_prefix(const struct printk_log *msg, bool syslog, char *buf)
return len;
}
-static size_t msg_print_text(const struct printk_log *msg, bool syslog, char *buf, size_t size)
+static size_t msg_print_text(const struct printk_log *msg, bool syslog,
+ char *buf, size_t size)
{
const char *text = log_text(msg);
size_t text_size = msg->text_len;
@@ -1636,7 +1637,8 @@ static bool cont_add(int facility, int level, enum log_flags flags, const char *
return true;
}
-static size_t log_output(int facility, int level, enum log_flags lflags, const char *dict, size_t dictlen, char *text, size_t text_len)
+static size_t log_output(int facility, int level, enum log_flags lflags,
+ const char *dict, size_t dictlen, char *text, size_t text_len)
{
/*
* If an earlier line was buffered, and we're a continuation
@@ -1651,7 +1653,10 @@ static size_t log_output(int facility, int level, enum log_flags lflags, const c
cont_flush();
}
- /* Skip empty continuation lines that couldn't be added - they just flush */
+ /*
+ * Skip empty continuation lines that couldn't
+ * be added - they just flush
+ */
if (!text_len && (lflags & LOG_CONT))
return 0;
@@ -1662,7 +1667,8 @@ static size_t log_output(int facility, int level, enum log_flags lflags, const c
}
/* Store it in the record log */
- return log_store(facility, level, lflags, 0, dict, dictlen, text, text_len);
+ return log_store(facility, level, lflags, 0, dict, dictlen,
+ text, text_len);
}
asmlinkage int vprintk_emit(int facility, int level,
@@ -1777,7 +1783,8 @@ asmlinkage int vprintk_emit(int facility, int level,
if (dict)
lflags |= LOG_PREFIX|LOG_NEWLINE;
- printed_len += log_output(facility, level, lflags, dict, dictlen, text, text_len);
+ printed_len += log_output(facility, level, lflags, dict, dictlen,
+ text, text_len);
logbuf_cpu = UINT_MAX;
raw_spin_unlock(&logbuf_lock);
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] printk: Remove no longer used second struct cont Geert Uytterhoeven <geert@linux-m68k.org> - 2016-12-15 14:30 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Petr Mladek <pmladek@suse.com> - 2016-12-15 17:30 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Joe Perches <joe@perches.com> - 2016-12-16 02:50 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-12-16 03:00 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-12-16 02:50 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Joe Perches <joe@perches.com> - 2016-12-16 03:00 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Linus Torvalds <torvalds@linux-foundation.org> - 2016-12-16 03:20 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Joe Perches <joe@perches.com> - 2016-12-16 03:40 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Junio C Hamano <gitster@pobox.com> - 2016-12-16 06:10 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Joe Perches <joe@perches.com> - 2016-12-16 07:10 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Linus Torvalds <torvalds@linux-foundation.org> - 2016-12-16 03:00 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-12-16 03:10 +0100
Re: [PATCH] printk: Remove no longer used second struct cont Scott Matheina <scott@matheina.com> - 2016-12-18 20:30 +0100
csiph-web