Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4275678rwb; Sun, 7 Aug 2022 20:06:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR4AeyOPo1LNLdDHvG/HIOKbV4mH8OWELFK4OnJYjFjlMG10SbmEKm0qeJqr4RxXIzu/1yEa X-Received: by 2002:a17:907:272a:b0:731:4699:b375 with SMTP id d10-20020a170907272a00b007314699b375mr3866656ejl.633.1659927963421; Sun, 07 Aug 2022 20:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659927963; cv=none; d=google.com; s=arc-20160816; b=TfSTjunP5D7Mkz2LpuNmuof/ixohV1OGPOEcziae+kx7yhdK3TDOzcUx77RfWnyS0l haywRdVAqgYwVzpwzvkN3PCuz9axxUGwy8KrM2xiA54UyobBl8jFce4RBJUIrY9Ceydw i90SXCLKjHV2cNPlL1KO8Er2ow8vLMPTh2BO5huuBiEw0JsxCyLO3UBuR+aIdtoA9DCV vYHDWGDdnibiodAJfefBvEX9XcDn6ke/WjcEidMWLDUILUFS63HP0iJrf90s+z2lT6s/ 85XJMm73dx62tYcr//vybaDps+8w4y3ICRyCMLFdOe1MymTCnkKYd/6v5/ZZZVe149+e 19bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3nTy8qXUtiWwK0lkpgZkPPlVZYKOkb4CQCRiIBiqF8c=; b=05WknNceGJJxDfnUxOL4PjV+2wb+eqp9jmOhod8v6bgObqvSNk/O+RUxlREoWHZcLQ uUZLeRBX0hYUUgyq6PpH7FYQUqenT08uSPnG0HGDf9ATHFFDFb3c7CDMP7jtbu1nlb1W iem9uK9wNPvXQu0ONBGlcHOXQwvQCO2RqGoMid6AzkPxb8qQqs1u+3gqKRc74DAuJJFZ VCbYzB17IcTzh4O2X49Jnuv3RdjbD2CEB2DSnJvxg4jAEUS3rymAzkHr5oOx+gsE/Pnv 3KZywy6pf1PrrtHn4mlNR7mpyfaITwX4RXu3WQ1hBn0cfT3xQoxcF+kqGwLnARoIaGVd EOpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VpQZmaPY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a18-20020a1709063e9200b0072b3b1c0a90si7629358ejj.339.2022.08.07.20.05.37; Sun, 07 Aug 2022 20:06:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VpQZmaPY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244094AbiHHCn0 (ORCPT + 99 others); Sun, 7 Aug 2022 22:43:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242554AbiHHClm (ORCPT ); Sun, 7 Aug 2022 22:41:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16EB25C7 for ; Sun, 7 Aug 2022 19:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=3nTy8qXUtiWwK0lkpgZkPPlVZYKOkb4CQCRiIBiqF8c=; b=VpQZmaPYMFsBUjC6WvDtekZH8C YSsZlzM2D3V9e5i+s/PW6VUHKYAy5S5ZYmgoaq58YZ/AqAUWR9+HWO0vrNCM5kVN+QTO5/4+6+KEY njEi1j9hXxBLU+joDPx7kB/pA+AnacjOw2jj8fi8GCb0GUiBpNtupvXXhZ0Y+2h81iS9p6KnMGIsl XBEN8qhvnDmh6TwB032v14BUyWiQLA0wbRiL0pVewLKkcgAZfbcxM4rKBeezyao1m01tyvV70DN7l W848IvKJ0rqI5j1AUExjUKhSkEcQGfpXXKdj/uL34ppYhmepBoHHpC+Q/hoI0Ux61r4/yQZj/MEh8 R/y1HUKw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKshy-00DVRz-2u; Mon, 08 Aug 2022 02:41:34 +0000 From: "Matthew Wilcox (Oracle)" To: linux-kernel@vger.kernel.org, pmladek@suse.com, Kent Overstreet Cc: Rasmus Villemoes Subject: [PATCH v5 18/32] vsprintf: flags_string() no longer takes printf_spec Date: Mon, 8 Aug 2022 03:41:14 +0100 Message-Id: <20220808024128.3219082-19-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220808024128.3219082-1-willy@infradead.org> References: <20220808024128.3219082-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kent Overstreet We're attempting to consolidate printf_spec and format string handling in the top level vpr_buf(), this changes time_and_date() to not take printf_spec. Signed-off-by: Kent Overstreet Cc: Petr Mladek Cc: Rasmus Villemoes --- lib/vsprintf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 784f7cb64926..38d16aa79e56 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1917,12 +1917,12 @@ void format_page_flags(struct printbuf *out, unsigned long flags) static noinline_for_stack void flags_string(struct printbuf *out, void *flags_ptr, - struct printf_spec spec, const char *fmt) + const char *fmt) { unsigned long flags; const struct trace_print_flags *names; - if (check_pointer_spec(out, flags_ptr, spec)) + if (check_pointer(out, flags_ptr)) return; switch (fmt[1]) { @@ -1937,7 +1937,7 @@ void flags_string(struct printbuf *out, void *flags_ptr, names = gfpflag_names; break; default: - return error_string_spec(out, "(%pG?)", spec); + return error_string(out, "(%pG?)"); } return format_flags(out, flags, names); @@ -2310,7 +2310,8 @@ void pointer(struct printbuf *out, const char *fmt, #endif case 'G': - return flags_string(out, ptr, spec, fmt); + flags_string(out, ptr, fmt); + return do_width_precision(out, prev_pos, spec); case 'O': return device_node_string(out, ptr, spec, fmt + 1); case 'f': -- 2.35.1