Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2532231rwl; Thu, 6 Apr 2023 11:33:09 -0700 (PDT) X-Google-Smtp-Source: AKy350b2tAzK5J2c618ipFd4YNblrxHHS1q77csCWjqgmKUZHjQZLCOJrZtmqHvihFcIUmq4malP X-Received: by 2002:aa7:d346:0:b0:4fb:78a0:eabf with SMTP id m6-20020aa7d346000000b004fb78a0eabfmr389842edr.29.1680805989524; Thu, 06 Apr 2023 11:33:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680805989; cv=none; d=google.com; s=arc-20160816; b=NnDNdTMqfMkBrECnIAQ2cldM+QlvXQeq6GpM8Fa7MHul57pA06BFOmOmZarmkxXzhh tNQJE+NLL46urbiF/9bVicuXeg81glA8hzcqeqRBGlC5oNnCE4vSnPoGKDleWmwU3Mio Qz1h5zGaPSN/S3vKxZaxzukuFWO6s/dHMPue6QWtA0GQ/VNYqccBpRWacp+t0yMu4lA3 Fah3ssh+gIbM4tT8k2QLIhBVA6IcPiJC1cZ/gJwmdUXiXm0utfO8Nm/LGokge+/5Gjvg fSVtfJhqnVObZMCqXvDYBFl5F/TpaYR9k8PkIy41PXU2oZWnE3Z1lq8j6MGnkcDirXmI LzrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Ml+QvVYem6MdBR0PvjkjHZWc3u+K9FvMDnqHsOUIQx4=; b=GOlnCiONbL5jxi9C6tc1gQ7j5AfvDzg/YfMsxm9KQxFwNBkWSI4Q+j0m2FhKPv2ydJ q2b6JC8+OhAT4I1duWKrPf8JPlxdLaAqaqujld+VMGaP+BnjPRkKrKMrvbnX6oSeA+3q kvhsGdMZ7aX3cWHKRkXc1cmzmZO7IMt8N3vKTZwCbGeOQafZVkumyXT8S/v2GTYOTm+x CKxZ4V5wp62tqvVQuaoW/7nl5WZq/PTKrN2PJlyzHkAJhr5Jw9MYXdzV59Xy/vslLHAY NN1QMakrtMUe069QD3GYKUcrC8pEGVXIkqUQDdpHp13XYZZz1gRAoe/o600ROD9GENph eHwg== ARC-Authentication-Results: i=1; mx.google.com; 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 y24-20020a056402135800b004fd2a5bbdd0si1383670edw.542.2023.04.06.11.32.43; Thu, 06 Apr 2023 11:33:09 -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; 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 S240158AbjDFS03 (ORCPT + 99 others); Thu, 6 Apr 2023 14:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240136AbjDFS01 (ORCPT ); Thu, 6 Apr 2023 14:26:27 -0400 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 94BD983FB; Thu, 6 Apr 2023 11:26:23 -0700 (PDT) Received: (from willy@localhost) by mail.home.local (8.17.1/8.17.1/Submit) id 336IQ9Q4005908; Thu, 6 Apr 2023 20:26:09 +0200 Date: Thu, 6 Apr 2023 20:26:09 +0200 From: Willy Tarreau To: Mark Brown , "Paul E. McKenney" Cc: Shuah Khan , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] tools/nolibc/stdio: Implement vprintf() Message-ID: References: <20230405-kselftest-nolibc-v2-0-2ac2495814b5@kernel.org> <20230405-kselftest-nolibc-v2-1-2ac2495814b5@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230405-kselftest-nolibc-v2-1-2ac2495814b5@kernel.org> X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 On Thu, Apr 06, 2023 at 05:19:10PM +0100, Mark Brown wrote: > vprintf() is equivalent to vfprintf() to stdout so implement it as a simple > wrapper for the existing vfprintf(), allowing us to build kselftest.h. > > Suggested-by: Willy Tarreau > Signed-off-by: Mark Brown > --- > tools/include/nolibc/stdio.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h > index 96ac8afc5aee..6cbbb52836a0 100644 > --- a/tools/include/nolibc/stdio.h > +++ b/tools/include/nolibc/stdio.h > @@ -273,6 +273,12 @@ int vfprintf(FILE *stream, const char *fmt, va_list args) > return written; > } > > +static __attribute__((unused)) > +int vprintf(const char *fmt, va_list args) > +{ > + return vfprintf(stdout, fmt, args); > +} > + > static __attribute__((unused, format(printf, 2, 3))) > int fprintf(FILE *stream, const char *fmt, ...) > { Perfect, thank you Mark, I'm glad that it simplified the rest of your series. Acked-by: Willy Tarreau Paul, feel free to directly queue this one for 6.5. If you prefer I can as well queue it on my side and send it later, it's just that I have exactly zero extra value on top of this one ;-) Thanks, Willy