Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1871607rwo; Thu, 3 Aug 2023 00:38:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlGN4WkOhW8+ldGrZcuql7VXRiT+OTPEMD+7bhhbEcpvrrsFAq4N85b/h9RYp+aXMAPX4AEu X-Received: by 2002:a17:906:53d3:b0:99b:f534:9bb6 with SMTP id p19-20020a17090653d300b0099bf5349bb6mr7744636ejo.9.1691048299014; Thu, 03 Aug 2023 00:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691048299; cv=none; d=google.com; s=arc-20160816; b=1JB2krHMfrVd3SdomlvV+4Bplxns9IPpVzyZAwXhc3UF1NcF0baOH39q4kP7JkfnV6 DRdGXW24BvnwECyFnZ915uyk3LJ5QjTFuiBx3iQPIogG7xX3fOLL8PXCxbpnvUv0mwcp EKkDAnZTyWMk1rcmcC67d5cLm5Vbgb82PSGMnWx1kv4YNKm7x8nPqQ0aA4JUhGrI7hxk 78+agdaZ2seujCwNg6ZqEtFcqGgzcYkis62adMplLcdEEBL97nriorXJ4OLFY9fAl7wq B/fOFNnTyd8jxhpWUXlub3axj/gKseh1Td3f+XEO41qPv/PfIx8nCpSm7gr9lE8B60Tj cMww== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a170906940b00b0099bccef89f8si11195534ejx.74.2023.08.03.00.37.54; Thu, 03 Aug 2023 00:38:19 -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 S233754AbjHCH3B (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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 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) -- 2.41.0