Received: by 10.223.185.116 with SMTP id b49csp397884wrg; Tue, 20 Feb 2018 23:45:45 -0800 (PST) X-Google-Smtp-Source: AH8x227dx3EBvW4yVXSfpyxq0F/ElJsV/lnvlHqZZ+ZmBaolg3h9Y+lax7V2V/kvKnpMeMfSPxE0 X-Received: by 10.101.96.47 with SMTP id p15mr1975004pgu.390.1519199145581; Tue, 20 Feb 2018 23:45:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519199145; cv=none; d=google.com; s=arc-20160816; b=wVcrMPsXy9UAlIl3HLTlgpsNOikHfldGm8RrYkYUdPoUsKvis9GcnqbP1kMvXiYahl CzRVo11vZM6bQcf+RZXj33cAmkQXdpd4t7uIGYy0xSjDdsFJGQWFvTWyBTds1hdhs040 tBL0MDbIQmQF/ae/uoJjreZ4mGh4a/m86Lu37QTEy1Fi3DiOrvux1R4ex00q701bxNro phfQcP7UNhmTGKcbqaW6fggbo7NXmu6kPebHTRg05PVl3UxgJ562I3ICnVsnjKP9HgRH 9E9gPFirfiLz7nLpU9w8pnEjBx8GcO3B8qu1p/9oBsiIM/d/x0GjrDtOGNysAvi/8RaO e2ZQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=nIhZ8mFRPSqbG1VJ6Yvxqp9+pChMjF25Ya0FGjPQFs4=; b=ar+n+CYlORYbnPPkN7a5vWJquXlkP4JHiOapQ2KBrPQfDCHYJ7UuzCiZ+1OBTmJL54 EQdj3RztZZ/BVj2sjosqj+ASk6xdC/kpSYPnGUgQ90AkhpM3vDb2D7S6DRd2xKxseSYG lFL/VD9iSlVZ6mZyGwoBl4dR5urdpP68rDRC4VLpkMll7ehz+deH3beT0gi+GW26cZvY C0YGmejFUb5gdahydPBoFsowTJsjx7L/eGI8FyZ9qRPYnbufTybe+jquDlmHVNoylFqf uAeZ70R7TYlLQ+VTEkBf7ziyR70hWbqo7LHzAbPIQxN/eQ0GzfvdehqVUfFET7v29ENk ZX+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@prevas.dk header.s=ironport2 header.b=g6Z0jfhr; 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 94-v6si800786plf.451.2018.02.20.23.45.31; Tue, 20 Feb 2018 23:45:45 -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; dkim=fail header.i=@prevas.dk header.s=ironport2 header.b=g6Z0jfhr; 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 S1751925AbeBUHi6 (ORCPT + 99 others); Wed, 21 Feb 2018 02:38:58 -0500 Received: from mail02.prevas.se ([62.95.78.10]:15165 "EHLO mail02.prevas.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751438AbeBUHi5 (ORCPT ); Wed, 21 Feb 2018 02:38:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=1096; q=dns/txt; s=ironport2; t=1519198736; x=1550734736; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=ICiH634QCYr8uQsNmzBX1UTF4tgrtL8j7pzOz0T4G74=; b=g6Z0jfhrrpjavTs0/IMQ0yMG6aLIG8BZ/Idkz0xgrzoYNqmJ60lCZOMK Dd2sh9UPVG0wosxel8mHYHk0CNnlYJwGQjB++YSalcDJQ4jh9WBQIiILL O4CeFKAXO9ATnnk9sB3I4Re13BaPDwWRggECiNBSB69pwFQ0LOupkXYG2 c=; X-IronPort-AV: E=Sophos;i="5.46,543,1511823600"; d="scan'208";a="3099670" Received: from vmprevas4.prevas.se (HELO smtp.prevas.se) ([172.16.8.104]) by ironport2.prevas.se with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Feb 2018 08:38:55 +0100 Received: from [172.16.11.22] (172.16.8.31) by smtp.prevas.se (172.16.8.104) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 21 Feb 2018 08:38:54 +0100 Subject: Re: [PATCH v2 01/21] lib/vsprintf: Print time and date in human readable format via %pt To: Joe Perches , Andy Shevchenko , Greg Kroah-Hartman , Andrew Morton , , Alessandro Zummo , Alexandre Belloni , , 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 References: <20180220214400.66749-1-andriy.shevchenko@linux.intel.com> <20180220214400.66749-2-andriy.shevchenko@linux.intel.com> <1519170907.4326.17.camel@perches.com> From: Rasmus Villemoes Message-ID: <1eac0dc6-93b0-2e01-075f-cf62c85318c5@prevas.dk> Date: Wed, 21 Feb 2018 08:38:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1519170907.4326.17.camel@perches.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.8.31] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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? Also, I agree with Joe's concern about the need to select it. 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... Rasmus