From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755148AbcEQKIo (ORCPT ); Tue, 17 May 2016 06:08:44 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35883 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752198AbcEQKIm (ORCPT ); Tue, 17 May 2016 06:08:42 -0400 Date: Tue, 17 May 2016 03:08:40 -0700 From: Tejun Heo To: Petr Mladek Cc: Calvin Owens , "Paul E. McKenney" , Andrew Morton , David Howells , Pranith Kumar , David Woodhouse , Johannes Weiner , Ard Biesheuvel , Sergey Senozhatsky , Vasily Averin , Thierry Reding , Geliang Tang , Ivan Delalande , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [RFC][PATCH] printk: Add option to append kernel version to the dict Message-ID: <20160517100840.GZ4775@htj.duckdns.org> References: <51047c0f6e86abcb9ee13f60653b6946f8fcfc99.1463172791.git.calvinowens@fb.com> <20160517092446.GI2895@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160517092446.GI2895@pathway.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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