Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp6177687rdb; Mon, 18 Sep 2023 06:31:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGcWLMBpDxy79E9qseojMzon5teMzdEy/4R5of7eUw0rwYG+jZtyMLH7z3y0INgp1dV0iXQ X-Received: by 2002:a05:6a20:a127:b0:159:1bd8:fc7a with SMTP id q39-20020a056a20a12700b001591bd8fc7amr8547467pzk.40.1695043891198; Mon, 18 Sep 2023 06:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695043891; cv=none; d=google.com; s=arc-20160816; b=yoYxE30vmenGWxfz04q3xnehDiI8cwmdzcRiF1CzkT8y8DUcqk1wWjrRF7wRj4XZmU wxiiD5x4YknWqctXl8doqW4Dj69wHSx0zWWY9ffgEOte8JxRisyZWDm3mMStVmqayDKD NnequCjl5tbCuWv6bQtCKHI6jcS0XZFDjE7lNxIG9BoQkB2UIz0o4IFT2V03PIHQw5OW JBods7ZjaIjIKcVnlQ3olB2pDzYb7k35kDPQq3BDs8DgDfyiFTZ1cwdp5f90QIG4CwPA FCRBaTCgxnn2GucY/EzgZKEBG9joXyLth1mU61q4GDGO//rwWG3+osXsdt1VBQMaBM7K pqQw== 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:dkim-signature; bh=xcPUNAZzzYR+P8It1Cx0RdncmhrL9JSNKSGRfCbHWg0=; fh=PCAErqEBDnHzg8PgzBn2c1x9VjA3mzSS1RZCtvoIi6Y=; b=I3FeTNyLFbJoxQctueFZVKrFkScet2btMhjIs9w2O1m9jnPHDFhhxPYUXz6wI68p8k O6D0aR+6GUhWNIRJ6aL4foJs8bvFSf4WPXE6AsNeNpbj9J4OQnGkqp9VP6u2vc1FzcjB LJSgxK16SrF30BwZqGXtNy9RsDJxYzr95Bvu2Ua34IVzWwQNpk7+ZH1RM1Ycy6QOVPj2 3eoLlUrjhNT5wTFYymtfHY0QLg2nTRIyeLg3MduFTq5+xmIau+Svm79C4x7So2kRAPva P1rAH9I0arJyK7jmkPFNw7Pa2ItoI3HWvcYyWbJojcCMIhUWEKWM8oBUvarZ2Yjtzm04 euqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=rYuutu8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id d15-20020a056a00198f00b0068ff3a3c9d0si8265891pfl.91.2023.09.18.06.31.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 06:31:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=rYuutu8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DDD698325D08; Sun, 17 Sep 2023 08:08:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236320AbjIQPHe (ORCPT + 99 others); Sun, 17 Sep 2023 11:07:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235690AbjIQPH1 (ORCPT ); Sun, 17 Sep 2023 11:07:27 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAA75B6; Sun, 17 Sep 2023 08:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1694963241; bh=7/Orlex/DcvUIrTiTjE7jsedSBarqpG1A2LXaMcy8Ag=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rYuutu8oStQ8LzGOg0Z6E4Zq1iuoPXBte3vGMm7tU5ca2WwdeLLkEDX5YWTddKPD9 HQ+fIvAsLr4WZ1Ov23zLu3BJs0gjM8xDZk+lHOvJYXl90vkx4fjwDs2wBt/2i8nfTa dDFx8MmxNfGpHZGHwZPrLptXsFTRR2ulS56I+E2A= Date: Sun, 17 Sep 2023 17:07:18 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Willy Tarreau Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Shuah Khan , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 2/4] tools/nolibc: avoid unused parameter warnings for ENOSYS fallbacks Message-ID: <1ef57a1e-89d3-4eb6-be12-3045a31f99e4@t-8ch.de> References: <20230914-nolibc-syscall-nr-v1-0-e50df410da11@weissschuh.net> <20230914-nolibc-syscall-nr-v1-2-e50df410da11@weissschuh.net> <20230917025851.GE9646@1wt.eu> <2bd688b7-5f1b-44ca-a41b-6e90dc3e8557@t-8ch.de> <20230917094827.GA11081@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230917094827.GA11081@1wt.eu> 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,URIBL_BLOCKED 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 17 Sep 2023 08:08:12 -0700 (PDT) On 2023-09-17 11:48:27+0200, Willy Tarreau wrote: > [..] > > Maybe the macro-equivalent of this? > > > > static inline int __nolibc_enosys(...) > > { > > return -ENOSYS; > > } > > > > The only-vararg function unfortunately needs C23 so we can't use it. > > > > It's clear to the users that this is about ENOSYS and we don't need a > > bunch of new macros similar. > > I like it, I didn't think about varargs, it's an excellent idea! Let's > just do simpler, start with a first arg "syscall_num" that we may later > reuse for debugging, and just mark this one unused: > > static inline int __nolibc_enosys(int syscall_num, ...) > { > (void)syscall_num; > return -ENOSYS; > } But which syscall_num to use, as the point of __nolibc_enosys() would be that no syscall number is available and the defines are missing. For debugging we could add a string argument, though.