mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Petr Mladek <pmladek@suse.com>
Cc: Calvin Owens <calvinowens@fb.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Howells <dhowells@redhat.com>,
	Pranith Kumar <bobby.prani@gmail.com>,
	David Woodhouse <David.Woodhouse@intel.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Vasily Averin <vvs@virtuozzo.com>,
	Thierry Reding <treding@nvidia.com>,
	Geliang Tang <geliangtang@163.com>,
	Ivan Delalande <colona@arista.com>,
	linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [RFC][PATCH] printk: Add option to append kernel version to the dict
Date: Tue, 17 May 2016 03:08:40 -0700	[thread overview]
Message-ID: <20160517100840.GZ4775@htj.duckdns.org> (raw)
In-Reply-To: <20160517092446.GI2895@pathway.suse.cz>

Hello,

On Tue, May 17, 2016 at 11:24:46AM +0200, Petr Mladek wrote:
> The risk is that someone else might need another information.
> If we do it more generic, we might end up with quite complex code.

It can be pretty simple given that there's no real ordering or
formatting involved.

  enum {
	  ECON_APPEND_RELEASE	= 1 << 0,
  ];

  static unsigned int ext_con_append_mask;

  static int __init ext_con_append_setup(char *str)
  {
	  while (*str) {
		  switch (*str) {
			  case 'r':
				  ext_con_append_mask |= ECON_APPEND_RELEASE;
				  break;
			  default:
				  pr_warning("Unknown ext ext con append format '%c'\n", *str);
		  }
		  str++;
	  }
	  return 1;
  }
  __setup("ext_con_append=", ext_con_append_setup);

And we can expand the list as necessary.  I don't think it needs to be
a compile time option either.  The code involved is minimal after all.

Thanks.

-- 
tejun

      reply	other threads:[~2016-05-17 10:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 20:58 Calvin Owens
2016-05-14 22:19 ` Richard Weinberger
2016-05-16 21:41   ` Calvin Owens
2016-05-15  6:36 ` Sergey Senozhatsky
2016-05-16 22:02   ` Calvin Owens
2016-05-17 14:42     ` Sergey Senozhatsky
2016-05-17 13:51       ` Tejun Heo
2016-05-17 15:43         ` Sergey Senozhatsky
2016-05-17 16:05           ` Tejun Heo
2016-05-17  9:24 ` Petr Mladek
2016-05-17 10:08   ` Tejun Heo [this message]

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=20160517100840.GZ4775@htj.duckdns.org \
    --to=tj@kernel.org \
    --cc=David.Woodhouse@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bobby.prani@gmail.com \
    --cc=calvinowens@fb.com \
    --cc=colona@arista.com \
    --cc=dhowells@redhat.com \
    --cc=geliangtang@163.com \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pmladek@suse.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=treding@nvidia.com \
    --cc=vvs@virtuozzo.com \
    /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

all inboxes | Powered by JetHome®