Skip to contentSkip to conversation

linux-user: Drop uint and ulong

PATCH In review Juan Quintela 3 participants 4 messages May 11, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: Drop uint and ulong

These are types not used anymore anywhere else.

---
 linux-user/mmap.c    | 2 +-
 linux-user/syscall.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
linux-user/mmap.c +1 -1
index 0aa8ae7356..55dd143a10 100644
@@ -859,7 +859,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
 
 static bool can_passthrough_madvise(abi_ulong start, abi_ulong end)
 {
-    ulong addr;
+    abi_ulong addr;
 
     if ((start | end) & ~qemu_host_page_mask) {
         return false;
linux-user/syscall.c +4 -4
index 69f740ff98..dd0349712b 100644
@@ -309,16 +309,16 @@ _syscall0(int, sys_gettid)
 #endif
 
 #if defined(TARGET_NR_getdents) && defined(EMULATE_GETDENTS_WITH_GETDENTS)
-_syscall3(int, sys_getdents, uint, fd, struct linux_dirent *, dirp, uint, count);
+_syscall3(int, sys_getdents, unsigned int, fd, struct linux_dirent *, dirp, unsigned int, count);
 #endif
 #if (defined(TARGET_NR_getdents) && \
       !defined(EMULATE_GETDENTS_WITH_GETDENTS)) || \
     (defined(TARGET_NR_getdents64) && defined(__NR_getdents64))
-_syscall3(int, sys_getdents64, uint, fd, struct linux_dirent64 *, dirp, uint, count);
+_syscall3(int, sys_getdents64, unsigned int, fd, struct linux_dirent64 *, dirp, unsigned int, count);
 #endif
 #if defined(TARGET_NR__llseek) && defined(__NR_llseek)
-_syscall5(int, _llseek,  uint,  fd, ulong, hi, ulong, lo,
-          loff_t *, res, uint, wh);
+_syscall5(int, _llseek,  unsigned int,  fd, unsigned long, hi, unsigned long, lo,
+          loff_t *, res, unsigned int, wh);
 #endif
 _syscall3(int, sys_rt_sigqueueinfo, pid_t, pid, int, sig, siginfo_t *, uinfo)
 _syscall4(int, sys_rt_tgsigqueueinfo, pid_t, pid, pid_t, tid, int, sig,
Signature · 1 line
2.40.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Juan Quintela

Le 11/05/2023 à 10:50, Juan Quintela a écrit :

Quoted 37 lines

These are types not used anymore anywhere else.

---
  linux-user/mmap.c    | 2 +-
  linux-user/syscall.c | 8 ++++----
  2 files changed, 5 insertions(+), 5 deletions(-)
linux-user/mmap.c +1 -1
index 0aa8ae7356..55dd143a10 100644
@@ -859,7 +859,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
 
  static bool can_passthrough_madvise(abi_ulong start, abi_ulong end)
  {
-    ulong addr;
+    abi_ulong addr;
 
      if ((start | end) & ~qemu_host_page_mask) {
          return false;
linux-user/syscall.c +1 -2
index 69f740ff98..dd0349712b 100644
@@ -309,16 +309,16 @@ _syscall0(int, sys_gettid)
  #endif
 
  #if defined(TARGET_NR_getdents) && defined(EMULATE_GETDENTS_WITH_GETDENTS)
-_syscall3(int, sys_getdents, uint, fd, struct linux_dirent *, dirp, uint, count);
+_syscall3(int, sys_getdents, unsigned int, fd, struct linux_dirent *, dirp, unsigned int, count);
  #endif
  #if (defined(TARGET_NR_getdents) && \
        !defined(EMULATE_GETDENTS_WITH_GETDENTS)) || \
      (defined(TARGET_NR_getdents64) && defined(__NR_getdents64))
-_syscall3(int, sys_getdents64, uint, fd, struct linux_dirent64 *, dirp, uint, count);

linux-user/syscall.c _syscall0(int, sys_gettid) · line 324

Quoted 10 lines
linux-user/syscall.c +3 -2
+_syscall3(int, sys_getdents64, unsigned int, fd, struct linux_dirent64 *, dirp, unsigned int, count);
  #endif
  #if defined(TARGET_NR__llseek) && defined(__NR_llseek)
-_syscall5(int, _llseek,  uint,  fd, ulong, hi, ulong, lo,
-          loff_t *, res, uint, wh);
+_syscall5(int, _llseek,  unsigned int,  fd, unsigned long, hi, unsigned long, lo,
+          loff_t *, res, unsigned int, wh);
  #endif
  _syscall3(int, sys_rt_sigqueueinfo, pid_t, pid, int, sig, siginfo_t *, uinfo)
  _syscall4(int, sys_rt_tgsigqueueinfo, pid_t, pid, pid_t, tid, int, sig,
#3 lore raw
Quoted 39 lines · Laurent Vivier

Le 11/05/2023 à 10:50, Juan Quintela a écrit :

Quoted 38 lines

These are types not used anymore anywhere else.

---
  linux-user/mmap.c    | 2 +-
  linux-user/syscall.c | 8 ++++----
  2 files changed, 5 insertions(+), 5 deletions(-)
linux-user/mmap.c +1 -1
index 0aa8ae7356..55dd143a10 100644
@@ -859,7 +859,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
    static bool can_passthrough_madvise(abi_ulong start, abi_ulong
 end)
  {
-    ulong addr;
+    abi_ulong addr;
        if ((start | end) & ~qemu_host_page_mask) {
          return false;
linux-user/syscall.c +2 -3
index 69f740ff98..dd0349712b 100644
@@ -309,16 +309,16 @@ _syscall0(int, sys_gettid)
  #endif
    #if defined(TARGET_NR_getdents) &&
 defined(EMULATE_GETDENTS_WITH_GETDENTS)
-_syscall3(int, sys_getdents, uint, fd, struct linux_dirent *, dirp, uint, count);
+_syscall3(int, sys_getdents, unsigned int, fd, struct linux_dirent *, dirp, unsigned int, count);
  #endif
  #if (defined(TARGET_NR_getdents) && \
        !defined(EMULATE_GETDENTS_WITH_GETDENTS)) || \
      (defined(TARGET_NR_getdents64) && defined(__NR_getdents64))
-_syscall3(int, sys_getdents64, uint, fd, struct linux_dirent64 *, dirp, uint, count);
+_syscall3(int, sys_getdents64, unsigned int, fd, struct linux_dirent64 *, dirp, unsigned int, count);
  #endif
  #if defined(TARGET_NR__llseek) && defined(__NR_llseek)
-_syscall5(int, _llseek,  uint,  fd, ulong, hi, ulong, lo,
Quoted 8 lines

linux-user/syscall.c _syscall0(int, sys_gettid) · line 324

Quoted 6 lines
linux-user/syscall.c +2 -1
-          loff_t *, res, uint, wh);
+_syscall5(int, _llseek,  unsigned int,  fd, unsigned long, hi, unsigned long, lo,
+          loff_t *, res, unsigned int, wh);
  #endif
  _syscall3(int, sys_rt_sigqueueinfo, pid_t, pid, int, sig, siginfo_t *, uinfo)
  _syscall4(int, sys_rt_tgsigqueueinfo, pid_t, pid, pid_t, tid, int, sig,

I assume this goes through your tree, right?

Later, Juan.