On 2023-08-04 18:00, Richard Henderson wrote:
From: Akihiko Odaki <akihiko.od...@daynix.com>
Later the returned value is compared with -1, and negated errno is not
expected.
Fixes: 00faf08c95 ("linux-user: Don't use MAP_FIXED in do_brk()")
Reviewed-by: Helge Deller <del...@gmx.de>
Signed-off-by: Akihiko Odaki <akihiko.od...@daynix.com>
Message-Id: <20230802071754.14876-4-akihiko.od...@daynix.com>
Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
linux-user/syscall.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 95727a816a..b9d2ec02f9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -862,9 +862,9 @@ abi_long do_brk(abi_ulong brk_val)
*/
if (new_host_brk_page > brk_page) {
new_alloc_size = new_host_brk_page - brk_page;
- mapped_addr = get_errno(target_mmap(brk_page, new_alloc_size,
- PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, 0, 0));
+ mapped_addr = target_mmap(brk_page, new_alloc_size,
+ PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, 0, 0);
} else {
new_alloc_size = 0;
mapped_addr = brk_page;
--
2.34.1
This patch is triggering a gitlab pipeline failure in Richard's tcg-next
branch:
https://gitlab.com/rth7680/qemu/-/pipelines/956532662
It can be reproduced locally by adding a git remote for rth7680 and then
running:
$ git checkout rth7680/tcg-next
$ .gitlab-ci.d/check-patch.py
Checking all commits since c26d005e62f4fd177dae0cd70c24cb96761edebc...
f7cca41b17c809958a7f04b7d7f64af40d64e645:31: ERROR: spaces required
around that '|' (ctx:VxV)
f7cca41b17c809958a7f04b7d7f64af40d64e645:32: ERROR: spaces required
around that '|' (ctx:VxV)
total: 2 errors, 0 warnings, 12 lines checked
❌ FAIL one or more commits failed scripts/checkpatch.pl
The linux-user/syscall.c has many such places where this style check is
failing. Should these be fixed in a separate patch?
Sincerely,
Nathan