Received: by 10.223.185.116 with SMTP id b49csp1022167wrg; Wed, 21 Feb 2018 10:43:09 -0800 (PST) X-Google-Smtp-Source: AH8x224ySLfGrG42F8FfcfTXbZOZMPJap2890h4AfNbPLgEDcwAjkn7v+mXQ3S2zxs3sKosn+r2c X-Received: by 10.101.85.204 with SMTP id k12mr3561572pgs.40.1519238589156; Wed, 21 Feb 2018 10:43:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238589; cv=none; d=google.com; s=arc-20160816; b=NkO8ASox6iA1eMoQy90IhQ2b4DLUgkzQTa/0QEu+M//q+Z9JvTrMCTsz2Xcyz6b/qc Dm16dyc/8Azl3tYank1w+xBUd86P/S8tcXwUxUZdDV8Ysy0WSnZ+yT7YuV1OGXuL9Csq E9rCb3iqWxds+/LzAYqavCdeq9kMLJHLTQ9UgqTduMHYTS0N6WDcOnsNf5adYYJrgxoO 32ebNsCaoUwYUP9mYtSlaA31UliyKmlmUkAUOFpWNO3ip6xCVIF5bHa560zrN5ubrOar pjgIOB9bI5UZyMSwE4PqCLsggh4964BVB7v2c8jkGhnuKXF22iNBkfRLTWwwB6iyCdkb NQ/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=RQYYOIcWVbt0x/OdbgUoAwIP5cyhcghpiUWT4Y68MyE=; b=sMlCyN6N4U3eWnge2Ak57ntGTYFmhFIASPxdRsv1zrZU6R5XYkVIjQvVL/6IjJpoie f3beugV/0DcgnjoeS8cbBe05igII8lg8aEWiam3md1wZ72mZw0x0/LaMS/gX+aFL4JV+ AJHLUj7syquBnN6Ug7ukUz0kEuZMNKYtQFnHW8sfdBN5EiK+dJju3XRiwi6zHGH+xToV AUdZVIwk+XGrOZzoaKer0JASejM/xZeVXe3ddAtDdDhRWNSAnwhegqwX71GZBppf2Y5V ql0LSvbCC8JTRNXxRfRv/fs/8wmozonZ/HqOLn1FxN8vkMd4Fx86tqlNPa+cGNLup5x7 vk0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v29si1804484pgc.526.2018.02.21.10.42.54; Wed, 21 Feb 2018 10:43:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936654AbeBUNX7 (ORCPT + 99 others); Wed, 21 Feb 2018 08:23:59 -0500 Received: from mga03.intel.com ([134.134.136.65]:24927 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754225AbeBUNXk (ORCPT ); Wed, 21 Feb 2018 08:23:40 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Feb 2018 05:23:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,543,1511856000"; d="scan'208";a="28750723" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by FMSMGA003.fm.intel.com with ESMTP; 21 Feb 2018 05:23:31 -0800 Message-ID: <1519219410.10722.25.camel@linux.intel.com> Subject: Re: [PATCH v2 01/21] lib/vsprintf: Print time and date in human readable format via %pt From: Andy Shevchenko To: Rasmus Villemoes , Joe Perches , Greg Kroah-Hartman , Andrew Morton , linux-kernel@vger.kernel.org, Alessandro Zummo , Alexandre Belloni , linux-rtc@vger.kernel.org, Arnd Bergmann , Mark Salyzyn Cc: Bartlomiej Zolnierkiewicz , Dmitry Torokhov , Geert Uytterhoeven , Guan Xuetao , Ingo Molnar , Jason Wessel , Jonathan Corbet , Jonathan Hunter , Krzysztof Kozlowski , "Rafael J. Wysocki" , Thierry Reding Date: Wed, 21 Feb 2018 15:23:30 +0200 In-Reply-To: <1eac0dc6-93b0-2e01-075f-cf62c85318c5@prevas.dk> References: <20180220214400.66749-1-andriy.shevchenko@linux.intel.com> <20180220214400.66749-2-andriy.shevchenko@linux.intel.com> <1519170907.4326.17.camel@perches.com> <1eac0dc6-93b0-2e01-075f-cf62c85318c5@prevas.dk> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.5-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-02-21 at 08:38 +0100, Rasmus Villemoes wrote: > On 2018-02-21 00:55, Joe Perches wrote: > > On Tue, 2018-02-20 at 23:43 +0200, Andy Shevchenko wrote: > > > There are users which print time and date represented by content > > > of > > > struct rtc_time in human readable format. > > > > > > Instead of open coding that each time introduce %ptR[dt][rv] > > > specifier. > > > > > > Note, users have to select PRINTK_PEXT_TIMEDATE option in a > > > Kconfig. > > > > Not sure this is a great option. > > Not just the name, the need to select it. > > Bikeshedding first: If you do keep the config option, please use > PRINTF, > not PRINTK - vsprintf can be and is used by lots of code other than > printk. OK. > Well, on the one hand, I like to reduce the size of the kernel when > possible and ideally make all new functionality guarded by config > options, but OTOH, how much does compiling out the datetime formatters > really save? https://lists.01.org/pipermail/kbuild-all/2017-June/034950.html I understand that half a year time allows us to increase kernel text size by 750+ bytes unconditionally. I would really like to not use any option. > Also, I agree with Joe's concern about the need to select > it. So, what exactly you are proposing? > Maybe if we had a gcc plugin that did %pFOO validation it could also > warn about %pBAR being used without a corresponding config option > being > set. But we don't have that currently... We have not, so, it's out of scope. If it's a big impediment, then I'm not the guy who will do the job. -- Andy Shevchenko Intel Finland Oy