linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] printk: remove unused flag LOG_NOCONS
       [not found] <CGME20180531102133epcas5p2e8d47887c1708836c9b70964983093e2@epcas5p2.samsung.com>
@ 2018-05-31 10:17 ` Maninder Singh
  2018-05-31 10:54   ` Sergey Senozhatsky
  2018-05-31 12:16   ` Petr Mladek
  0 siblings, 2 replies; 7+ messages in thread
From: Maninder Singh @ 2018-05-31 10:17 UTC (permalink / raw)
  To: pmladek, sergey.senozhatsky, rostedt
  Cc: linux-kernel, a.sahrawat, pankaj.m, v.narang, Maninder Singh

This patch removes unused flag LOG_NOCONS for printk.
usage of this flag is removed long back with below commit.

"5c2992ee7fd8a29d04125dc0aa3522784c5fa5eb"
printk: remove console flushing special cases for
 partial buffered lines

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Vaneet Narang <v.narang@samsung.com>
---
 kernel/printk/printk.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 2f4af21..ab15903 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -349,10 +349,9 @@ enum con_msg_format_flags {
  */
 
 enum log_flags {
-	LOG_NOCONS	= 1,	/* already flushed, do not print to console */
-	LOG_NEWLINE	= 2,	/* text ended with a newline */
-	LOG_PREFIX	= 4,	/* text started with a prefix */
-	LOG_CONT	= 8,	/* text is a fragment of a continuation line */
+	LOG_NEWLINE	= 1,	/* text ended with a newline */
+	LOG_PREFIX	= 2,	/* text started with a prefix */
+	LOG_CONT	= 4,	/* text is a fragment of a continuation line */
 };
 
 struct printk_log {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] printk: remove unused flag LOG_NOCONS
  2018-05-31 10:17 ` [PATCH 1/2] printk: remove unused flag LOG_NOCONS Maninder Singh
@ 2018-05-31 10:54   ` Sergey Senozhatsky
  2018-05-31 12:16   ` Petr Mladek
  1 sibling, 0 replies; 7+ messages in thread
From: Sergey Senozhatsky @ 2018-05-31 10:54 UTC (permalink / raw)
  To: Maninder Singh
  Cc: pmladek, sergey.senozhatsky, rostedt, linux-kernel, a.sahrawat,
	pankaj.m, v.narang

On (05/31/18 15:47), Maninder Singh wrote:
> 
> This patch removes unused flag LOG_NOCONS for printk.
> usage of this flag is removed long back with below commit.
> 
> "5c2992ee7fd8a29d04125dc0aa3522784c5fa5eb"
> printk: remove console flushing special cases for
>  partial buffered lines
> 
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Signed-off-by: Vaneet Narang <v.narang@samsung.com>

Makes sense.

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

	-ss

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] printk: remove unused flag LOG_NOCONS
  2018-05-31 10:17 ` [PATCH 1/2] printk: remove unused flag LOG_NOCONS Maninder Singh
  2018-05-31 10:54   ` Sergey Senozhatsky
@ 2018-05-31 12:16   ` Petr Mladek
  2018-05-31 15:12     ` Joe Perches
  2018-06-04 21:33     ` Steven Rostedt
  1 sibling, 2 replies; 7+ messages in thread
From: Petr Mladek @ 2018-05-31 12:16 UTC (permalink / raw)
  To: Maninder Singh
  Cc: sergey.senozhatsky, rostedt, linux-kernel, a.sahrawat, pankaj.m,
	v.narang

On Thu 2018-05-31 15:47:51, Maninder Singh wrote:
> This patch removes unused flag LOG_NOCONS for printk.
> usage of this flag is removed long back with below commit.

Make sense.

> "5c2992ee7fd8a29d04125dc0aa3522784c5fa5eb"
> printk: remove console flushing special cases for
>  partial buffered lines
> 
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Signed-off-by: Vaneet Narang <v.narang@samsung.com>
> ---
>  kernel/printk/printk.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 2f4af21..ab15903 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -349,10 +349,9 @@ enum con_msg_format_flags {
>   */
>  
>  enum log_flags {
> -	LOG_NOCONS	= 1,	/* already flushed, do not print to console */
> -	LOG_NEWLINE	= 2,	/* text ended with a newline */
> -	LOG_PREFIX	= 4,	/* text started with a prefix */
> -	LOG_CONT	= 8,	/* text is a fragment of a continuation line */
> +	LOG_NEWLINE	= 1,	/* text ended with a newline */
> +	LOG_PREFIX	= 2,	/* text started with a prefix */
> +	LOG_CONT	= 4,	/* text is a fragment of a continuation line */
>  };

Please, do not renumber the bits if there is no real need for it.
The format of the log buffer is read also by external tool like
"crash". It seems that "crash" ignores these flags but...

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] printk: remove unused flag LOG_NOCONS
  2018-05-31 12:16   ` Petr Mladek
@ 2018-05-31 15:12     ` Joe Perches
  2018-06-05 12:59       ` Petr Mladek
  2018-06-04 21:33     ` Steven Rostedt
  1 sibling, 1 reply; 7+ messages in thread
From: Joe Perches @ 2018-05-31 15:12 UTC (permalink / raw)
  To: Petr Mladek, Maninder Singh
  Cc: sergey.senozhatsky, rostedt, linux-kernel, a.sahrawat, pankaj.m,
	v.narang

On Thu, 2018-05-31 at 14:16 +0200, Petr Mladek wrote:
> On Thu 2018-05-31 15:47:51, Maninder Singh wrote:
> > This patch removes unused flag LOG_NOCONS for printk.
> > usage of this flag is removed long back with below commit.
> 
> Make sense.
> 
> > "5c2992ee7fd8a29d04125dc0aa3522784c5fa5eb"
> > printk: remove console flushing special cases for
> >  partial buffered lines
[]
> > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
[]
> > @@ -349,10 +349,9 @@ enum con_msg_format_flags {
> >   */
> >  
> >  enum log_flags {
> > -	LOG_NOCONS	= 1,	/* already flushed, do not print to console */
> > -	LOG_NEWLINE	= 2,	/* text ended with a newline */
> > -	LOG_PREFIX	= 4,	/* text started with a prefix */
> > -	LOG_CONT	= 8,	/* text is a fragment of a continuation line */
> > +	LOG_NEWLINE	= 1,	/* text ended with a newline */
> > +	LOG_PREFIX	= 2,	/* text started with a prefix */
> > +	LOG_CONT	= 4,	/* text is a fragment of a continuation line */
> >  };
> 
> Please, do not renumber the bits if there is no real need for it.
> The format of the log buffer is read also by external tool like
> "crash". It seems that "crash" ignores these flags but...

Hmm, if it's not an internal interface, then these
definitions should probably be removed from this file
and exposed in a uapi file.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] printk: remove unused flag LOG_NOCONS
  2018-05-31 12:16   ` Petr Mladek
  2018-05-31 15:12     ` Joe Perches
@ 2018-06-04 21:33     ` Steven Rostedt
  2018-06-05 12:56       ` Petr Mladek
  1 sibling, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2018-06-04 21:33 UTC (permalink / raw)
  To: Petr Mladek
  Cc: Maninder Singh, sergey.senozhatsky, linux-kernel, a.sahrawat,
	pankaj.m, v.narang

On Thu, 31 May 2018 14:16:33 +0200
Petr Mladek <pmladek@suse.com> wrote:

> >  enum log_flags {
> > -	LOG_NOCONS	= 1,	/* already flushed, do not print to console */
> > -	LOG_NEWLINE	= 2,	/* text ended with a newline */
> > -	LOG_PREFIX	= 4,	/* text started with a prefix */
> > -	LOG_CONT	= 8,	/* text is a fragment of a continuation line */
> > +	LOG_NEWLINE	= 1,	/* text ended with a newline */
> > +	LOG_PREFIX	= 2,	/* text started with a prefix */
> > +	LOG_CONT	= 4,	/* text is a fragment of a continuation line */
> >  };  
> 
> Please, do not renumber the bits if there is no real need for it.
> The format of the log buffer is read also by external tool like
> "crash". It seems that "crash" ignores these flags but...

Then what's the problem for renumbering? I've renumbered internal flags
before. No one complained about it.

-- Steve

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] printk: remove unused flag LOG_NOCONS
  2018-06-04 21:33     ` Steven Rostedt
@ 2018-06-05 12:56       ` Petr Mladek
  0 siblings, 0 replies; 7+ messages in thread
From: Petr Mladek @ 2018-06-05 12:56 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Maninder Singh, sergey.senozhatsky, linux-kernel, a.sahrawat,
	pankaj.m, v.narang

On Mon 2018-06-04 17:33:42, Steven Rostedt wrote:
> On Thu, 31 May 2018 14:16:33 +0200
> Petr Mladek <pmladek@suse.com> wrote:
> 
> > >  enum log_flags {
> > > -	LOG_NOCONS	= 1,	/* already flushed, do not print to console */
> > > -	LOG_NEWLINE	= 2,	/* text ended with a newline */
> > > -	LOG_PREFIX	= 4,	/* text started with a prefix */
> > > -	LOG_CONT	= 8,	/* text is a fragment of a continuation line */
> > > +	LOG_NEWLINE	= 1,	/* text ended with a newline */
> > > +	LOG_PREFIX	= 2,	/* text started with a prefix */
> > > +	LOG_CONT	= 4,	/* text is a fragment of a continuation line */
> > >  };  
> > 
> > Please, do not renumber the bits if there is no real need for it.
> > The format of the log buffer is read also by external tool like
> > "crash". It seems that "crash" ignores these flags but...
> 
> Then what's the problem for renumbering? I've renumbered internal flags
> before. No one complained about it.

Steven, did you renumber enum log_flags or flags in a different
subsystem?

Note that struct printk_log is a bit special because it is used by
the "crash" tool to implement the dmesg/log command. While "crash"
tool does not have special handling for most other internal
structures.

I have double checked "crash" sources and it ignores these flags
at the moment but it might change in the future => I suggest to
do not renumber them if there is not a real need.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] printk: remove unused flag LOG_NOCONS
  2018-05-31 15:12     ` Joe Perches
@ 2018-06-05 12:59       ` Petr Mladek
  0 siblings, 0 replies; 7+ messages in thread
From: Petr Mladek @ 2018-06-05 12:59 UTC (permalink / raw)
  To: Joe Perches
  Cc: Maninder Singh, sergey.senozhatsky, rostedt, linux-kernel,
	a.sahrawat, pankaj.m, v.narang

On Thu 2018-05-31 08:12:23, Joe Perches wrote:
> On Thu, 2018-05-31 at 14:16 +0200, Petr Mladek wrote:
> > On Thu 2018-05-31 15:47:51, Maninder Singh wrote:
> > > This patch removes unused flag LOG_NOCONS for printk.
> > > usage of this flag is removed long back with below commit.
> > 
> > Make sense.
> > 
> > > "5c2992ee7fd8a29d04125dc0aa3522784c5fa5eb"
> > > printk: remove console flushing special cases for
> > >  partial buffered lines
> []
> > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> []
> > > @@ -349,10 +349,9 @@ enum con_msg_format_flags {
> > >   */
> > >  
> > >  enum log_flags {
> > > -	LOG_NOCONS	= 1,	/* already flushed, do not print to console */
> > > -	LOG_NEWLINE	= 2,	/* text ended with a newline */
> > > -	LOG_PREFIX	= 4,	/* text started with a prefix */
> > > -	LOG_CONT	= 8,	/* text is a fragment of a continuation line */
> > > +	LOG_NEWLINE	= 1,	/* text ended with a newline */
> > > +	LOG_PREFIX	= 2,	/* text started with a prefix */
> > > +	LOG_CONT	= 4,	/* text is a fragment of a continuation line */
> > >  };
> > 
> > Please, do not renumber the bits if there is no real need for it.
> > The format of the log buffer is read also by external tool like
> > "crash". It seems that "crash" ignores these flags but...
> 
> Hmm, if it's not an internal interface, then these
> definitions should probably be removed from this file
> and exposed in a uapi file.

"crash" is not a typical userspace tool. We break it regularly.
We do not need to put the API into the stone because of "crash".
On the other hand, we also need not break it if it can be avoided
easily.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-06-05 12:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20180531102133epcas5p2e8d47887c1708836c9b70964983093e2@epcas5p2.samsung.com>
2018-05-31 10:17 ` [PATCH 1/2] printk: remove unused flag LOG_NOCONS Maninder Singh
2018-05-31 10:54   ` Sergey Senozhatsky
2018-05-31 12:16   ` Petr Mladek
2018-05-31 15:12     ` Joe Perches
2018-06-05 12:59       ` Petr Mladek
2018-06-04 21:33     ` Steven Rostedt
2018-06-05 12:56       ` Petr Mladek

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).