From: Andreas Schwab <schwab@suse.de>
To: Celeste Liu <coelacanthushex@gmail.com>
Cc: "Palmer Dabbelt" <palmer@rivosinc.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Guo Ren" <guoren@kernel.org>, "Björn Töpel" <bjorn@rivosinc.com>,
"Conor Dooley" <conor.dooley@microchip.com>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
"Felix Yan" <felixonmars@archlinux.org>,
"Ruizhe Pan" <c141028@gmail.com>,
"Shiqi Zhang" <shiqi@isrc.iscas.ac.cn>
Subject: Re: [PATCH v3] riscv: entry: set a0 = -ENOSYS only when syscall != -1
Date: Wed, 19 Jul 2023 09:21:43 +0200 [thread overview]
Message-ID: <mvmo7k8cqns.fsf@suse.de> (raw)
In-Reply-To: <20230718210037.250665-1-CoelacanthusHex@gmail.com> (Celeste Liu's message of "Wed, 19 Jul 2023 04:57:30 +0800")
On Jul 19 2023, Celeste Liu wrote:
> @@ -308,7 +312,7 @@ asmlinkage __visible __trap_section void do_trap_ecall_u(struct pt_regs *regs)
>
> if (syscall < NR_syscalls)
> syscall_handler(regs, syscall);
> - else
> + else if ((long)syscall != -1L)
You can also use syscall != -1UL or even syscall != -1.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2023-07-19 7:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 20:57 Celeste Liu
2023-07-18 21:20 ` Björn Töpel
2023-07-18 23:40 ` Guo Ren
2023-07-19 13:13 ` David Laight
2023-07-19 7:21 ` Andreas Schwab [this message]
2023-07-19 16:28 ` Björn Töpel
2023-07-20 6:46 ` Celeste Liu
2023-07-20 9:08 ` Björn Töpel
2023-07-20 19:24 ` Celeste Liu
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=mvmo7k8cqns.fsf@suse.de \
--to=schwab@suse.de \
--cc=aou@eecs.berkeley.edu \
--cc=bjorn@rivosinc.com \
--cc=c141028@gmail.com \
--cc=coelacanthushex@gmail.com \
--cc=conor.dooley@microchip.com \
--cc=felixonmars@archlinux.org \
--cc=guoren@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@rivosinc.com \
--cc=paul.walmsley@sifive.com \
--cc=shiqi@isrc.iscas.ac.cn \
/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
Powered by JetHome