linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>, Shuah Khan <shuah@kernel.org>,
	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
Date: Sun, 17 Sep 2023 17:08:20 +0200	[thread overview]
Message-ID: <20230917150820.GA14418@1wt.eu> (raw)
In-Reply-To: <1ef57a1e-89d3-4eb6-be12-3045a31f99e4@t-8ch.de>

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

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2023-09-17 15:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 16:01 [PATCH 0/4] tools/nolibc: cleanups for syscall fallbacks Thomas Weißschuh
2023-09-14 16:01 ` [PATCH 1/4] selftests/nolibc: allow building i386 with multiarch compiler Thomas Weißschuh
2023-09-17  2:49   ` Willy Tarreau
2023-09-14 16:01 ` [PATCH 2/4] tools/nolibc: avoid unused parameter warnings for ENOSYS fallbacks Thomas Weißschuh
2023-09-17  2:58   ` Willy Tarreau
2023-09-17  5:49     ` Thomas Weißschuh
2023-09-17  9:48       ` Willy Tarreau
2023-09-17 15:07         ` Thomas Weißschuh
2023-09-17 15:08           ` Willy Tarreau [this message]
2023-09-14 16:01 ` [PATCH 3/4] tools/nolibc: don't define new syscall number Thomas Weißschuh
2023-09-17  2:59   ` Willy Tarreau
2023-09-14 16:01 ` [PATCH 4/4] tools/nolibc: automatically detect necessity to use pselect6 Thomas Weißschuh
2023-09-17  3:07   ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230917150820.GA14418@1wt.eu \
    --to=w@1wt.eu \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux@weissschuh.net \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).