From patchwork Thu Aug 3 07:28:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 130417 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp999441vqx; Thu, 3 Aug 2023 01:37:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlFMA/r1iM0uAk0a+5Q+yADnMDD9G7GbO8VxUA1lcUpCxh+SsGuTmvmGH01b8Dv9R0YrIs/0 X-Received: by 2002:a05:6a20:7346:b0:126:f64b:6689 with SMTP id v6-20020a056a20734600b00126f64b6689mr21451012pzc.12.1691051850693; Thu, 03 Aug 2023 01:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691051850; cv=none; d=google.com; s=arc-20160816; b=ICXAyJPUekq+U7XsdDK94ZyKUUGnhzZoDzEIboDPrk26Bvt9C4/R+NdDdXOu5xvTXF fsYPJ8qQoCmLyqCkXOLhAxL50RBnsGV+oBf0Scbe3o5Ehs97ax9Y3JRsxBjGWT8KWbZq FUZ2iNH5Zmfz+d9/NxiGUGzH/DW3JpKM1vpDw0CCQZ5aVgSNeJTpXb/Uh5D6PS9ySfX9 DGu7+eA3kS2BIzWppuWvrNJ+PDYqAign1fNy+Zk3V+NlxruGdAPJOvhUqb3fdBm0SW5I rKlg007KxF/tGhNtNyLf9aFFO303vj1jGS/CyK6+NbJrAwCgil3iJmavtlhXKwpDXzvO EE0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=55QDnG+6+eZEeLxQULov/na55j67f1io727yUtR6gx8=; fh=UZfhiU2pgwvZdBOe9fFEhnfTQX0/6KsvXKQubWsfhik=; b=yQXslz7pj1EB1XCC3vxuJT/PlRLk9bA8iIAXPYh01AgVuFYFqvM5OuXjZWl4lQoLN9 R0eejU+47oSsNPqM3C3r+A3Fdu/Jz7aJ5B4uFUPZyZmMQShzgO5Vq2ZHw60i9i8YyieK S5+emZLSr3pgROWj6N6AoEmzsgwAykG7mPNWhDbXJgHriDgDMyDTvtVf+yQxUZRPTJa2 oiGE4HjpTTLt7mr/P++JOCeb0ICTGYM1wzeuqwiFmpJ6EJSf2F77v2uNVCES9bnAmTiM yUkGWU+/VllQvWe95line+jBUtoCqtXQDdo0DmTwtEGwLdVzsTJteIoOy3W+70IIMxdJ wHOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=BMh1bDsk; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e64-20020a636943000000b0055397736c02si9774720pgc.842.2023.08.03.01.37.17; Thu, 03 Aug 2023 01:37:30 -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=@weissschuh.net header.s=mail header.b=BMh1bDsk; 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 S232544AbjHCH3B (ORCPT + 99 others); Thu, 3 Aug 2023 03:29:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231771AbjHCH2w (ORCPT ); Thu, 3 Aug 2023 03:28:52 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46BF6272A; Thu, 3 Aug 2023 00:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1691047728; bh=Kc+QdIXEiriZU7G8O0tQxJI0UlyXn+ahx8/7NZv6UOI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=BMh1bDsk6/kxaJrHT6o97UVSd6wbtiq/uu64gzptWH2Ws3t3UADHmCGpm//BfQVGt j5Snvsm9ei6gW9FtSFuGmBBJ7olzU1++pvIyRAMpGTlBnn/Zc1n3A02XV39JnD7lc6 jMntC4aSUERO6vMVgP4xVmSbJpL11M4rDZqopRk8= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 03 Aug 2023 09:28:46 +0200 Subject: [PATCH v3 02/14] tools/nolibc: fix return type of getpagesize() MIME-Version: 1.0 Message-Id: <20230803-nolibc-warnings-v3-2-bcc1a096ae02@weissschuh.net> References: <20230803-nolibc-warnings-v3-0-bcc1a096ae02@weissschuh.net> In-Reply-To: <20230803-nolibc-warnings-v3-0-bcc1a096ae02@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Yuan Tan , Zhangjin Wu , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691047727; l=1272; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Kc+QdIXEiriZU7G8O0tQxJI0UlyXn+ahx8/7NZv6UOI=; b=u/P0udBpE4q6UzvgDTxFjgz2+bHM5uIMee8vumQczRMeEd5B8Qlfkf4PJu4x4TCaiC/LeylD9 Es7vLxLlhTADwKVNUwV7OV6umoHFR8m5a6wbNkY/r1bDCLMbDV60y7R X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773196385211193455 X-GMAIL-MSGID: 1773196385211193455 It's documented as returning int which is also implemented by glibc and musl, so adopt that return type. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/sys.h | 4 ++-- tools/testing/selftests/nolibc/nolibc-test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index e12dd962c578..c151533ba8e9 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -460,11 +460,11 @@ pid_t gettid(void) static unsigned long getauxval(unsigned long key); /* - * long getpagesize(void); + * int getpagesize(void); */ static __attribute__((unused)) -long getpagesize(void) +int getpagesize(void) { return __sysret(getauxval(AT_PAGESZ) ?: -ENOENT); } diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 3a21bee360ea..52489455add8 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -636,7 +636,7 @@ int test_getdents64(const char *dir) static int test_getpagesize(void) { - long x = getpagesize(); + int x = getpagesize(); int c; if (x < 0)