Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1937104rwb; Sun, 14 Aug 2022 16:39:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR6qWrWH4k4KH2OXpWT6dWeLtgyy+XWf66rhdvi9z2niJxDyDk/69eIvk/KBXhJPSgV02Erz X-Received: by 2002:a17:907:75ee:b0:730:b801:614 with SMTP id jz14-20020a17090775ee00b00730b8010614mr8603013ejc.698.1660520367024; Sun, 14 Aug 2022 16:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660520367; cv=none; d=google.com; s=arc-20160816; b=cFfuniSFXhXopxBF3I7rT2UkSAeWih+hHQECrO+GAmSNx7J8nZMJDOdDGP6xIq1gQv Ofg/LuOexeGsLywoz9eH3fdkyOjkuzjyHlin/sOK9p0RXsP/S6ELEBOSuI3+I+WagOsS KCWoyT8zyXZTmAhV/yiEVbotwCaWuhgABWTR2aZqBmSyb759qE7fe0BI+6yEnC3VOWUE qBCNIS0xF+KD4/sYdA4YMIrxaKEliMsrs9u3+ykGVNKosAfG4vfUdHf49m7qYXsHE7q+ HjC/erJ45j/rWlTgoG2E4ObrlbcwrfUH6ltEZUwmZGvRgSjg9KDih79DOD4P/NYrNwY0 GBzQ== 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=buF7wG/i3eq2IPWWvoBgGDXocR1Q8NCknRivAQ1Ll1g=; b=a8KbyirEAyJRNnUybOBoriMxZ+KDJyCZsohRG2x2aZI0ZZVZD4/PtTgNvH/m6v1Fm9 Bv2Tpr7DsxmU5+7I60zgwF96t8y0U5GUz1QZb2K+nOShDR8hhzUMhQfcfGq8oy8ICG5X 9FPahbUj/I6QuAw7WJ7u/cBO0mYrAhnAmb9xROYO4IA3aOP9usJzMXZSaw1HY9Lto1J+ w8ORsm4DsD5lLmkNnQQO4mVaX/dA/8ynEty3Q7AevI69bm7xwBcmw1WWY0ZcxwlCQmqv mJonl/gXtJ+wAuHWuldlqmMGWzkoWch9HzpIe29x5+ED9DjMudRAaz85p2sDNMCPnVil mPEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=TV+NS48C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w1-20020a1709064a0100b00730936657d1si5568821eju.552.2022.08.14.16.38.56; Sun, 14 Aug 2022 16:39:27 -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=@linux.dev header.s=key1 header.b=TV+NS48C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240208AbiHNVWf (ORCPT + 99 others); Sun, 14 Aug 2022 17:22:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240579AbiHNVVo (ORCPT ); Sun, 14 Aug 2022 17:21:44 -0400 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FC66A46D for ; Sun, 14 Aug 2022 14:20:56 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1660512055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=buF7wG/i3eq2IPWWvoBgGDXocR1Q8NCknRivAQ1Ll1g=; b=TV+NS48CapsHemM8V7WI1qIBmzG8+Tu0ipLaGkPw79t2NaUhvacla0PDb/D//mt33vW81b eSY8ChEqQ8nsNEFe/AhB50kxPm89F7Qp+kMqdNCTr+KkNQra8GU8ceLPO4H7p/hZdGxX3e SpRuxpsrWIoMYgFdNKv9YcB9QBElH7U= From: Kent Overstreet To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, Kent Overstreet , Petr Mladek , Rasmus Villemoes Subject: [PATCH 18/32] vsprintf: flags_string() no longer takes printf_spec Date: Sun, 14 Aug 2022 17:19:57 -0400 Message-Id: <20220814212011.1727798-19-kent.overstreet@linux.dev> In-Reply-To: <20220814212011.1727798-1-kent.overstreet@linux.dev> References: <20220814212011.1727798-1-kent.overstreet@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,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 8154beae12..df954902a1 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.36.1