Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5695375rdb; Sun, 17 Sep 2023 08:09:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgisn3ZK+zhptyKRIzXtK2OZJysAM1s2MW5OtUuyS9DZtl90Rwbap9notFN+Kh9XJew5H9 X-Received: by 2002:a17:90b:3104:b0:263:fbe5:2125 with SMTP id gc4-20020a17090b310400b00263fbe52125mr4561875pjb.15.1694963388320; Sun, 17 Sep 2023 08:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694963388; cv=none; d=google.com; s=arc-20160816; b=ptBdO65WVK6XPTBd7gj2pAGFpGen5yACurQC6ZoTJPXohwCUp4K0mPNgZADN3s6GWB EL+dltWiVn5t9dPIBsibSU7SNW/CooixbjvigcEDwvvkVlzvc3gLNpZLYdj+TF4f1DcE Mh05LVwmX+ewoXKvlCgOLu7RUpVQsK5637CudxBRb9MbRFSfgWsv4ClDycYYWuXKXhWn nQ/POBtqzh6Xt5ryzpCgPnR7OtznwpCJL+KG2urY75zqE4wwD0EGkRxFfAAEkW5ND2Va lXflTyTtDFhJyr6qvKfQFxzqDctrFmqfIfhPd3kJecVePrkW1as/KNoH5YOj9rrW7gkB cnsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TurFLb7W+h9WQt2/skUagrRb6qXKvq8u73DzHkD8nb0=; fh=q3eJ70+nPBBOurH5DI6uivZtkSdfT1YhlPrRDAlF5bE=; b=tc2YZqZuEIcJRpJlmx16ZMngbzAP9Dn4W5yqpm/m+wyfmh1FtdR6W139VJ28ubFa5t 7ylgZnuS/seu4K5FVGIDB7TzRPg9DXjmedFVmdWzP+hghPxvgHMh9LRN4jxgYevqVhb6 Z3X65YL9iO/tDF+TzQydhRQMuzMBSNW8ygDg518pzCvgyPFZp/cpmvPvPPRnXHQZe3LS qQneQRQ+YsjGAbapNMMSe7bHckudJls5NNhWpzJBwSYW16ovG6TCsa1pIRaYXlGI9Sf8 D6CbnwK83N0F37Ou/hz8Ys4X0HtFH+Ga/nJrT38CshDsDIqyFUPiR9MuQB7U/eQ0aeyV Pg2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bg5-20020a17090b0d8500b0027491bac826si4747625pjb.140.2023.09.17.08.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 08:09:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 6DD15808A40A; Sun, 17 Sep 2023 08:09:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235615AbjIQPJI (ORCPT + 99 others); Sun, 17 Sep 2023 11:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237269AbjIQPI7 (ORCPT ); Sun, 17 Sep 2023 11:08:59 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B84DB187; Sun, 17 Sep 2023 08:08:53 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 38HF8KQT014506; Sun, 17 Sep 2023 17:08:20 +0200 Date: Sun, 17 Sep 2023 17:08:20 +0200 From: Willy Tarreau To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= 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: <20230917150820.GA14418@1wt.eu> 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> <1ef57a1e-89d3-4eb6-be12-3045a31f99e4@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1ef57a1e-89d3-4eb6-be12-3045a31f99e4@t-8ch.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Sun, 17 Sep 2023 08:09:46 -0700 (PDT) On Sun, Sep 17, 2023 at 05:07:18PM +0200, Thomas Wei?schuh wrote: > 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. good point :-) > For debugging we could add a string argument, though. That works for me. Willy