On 24/11/2023 16.30, Philippe Mathieu-Daudé wrote:
Hi,

On 24/11/23 05:45, xun wrote:
From: Yihuan Pan <xun...@gmail.com>

Replaces TABS with spaces to ensure have a consistent coding
style with an indentation of 4 spaces in the SH4 subsystem.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/376
Signed-off-by: Yihuan Pan <xun...@gmail.com>
---
  linux-user/sh4/termbits.h |  204 +++---
  target/sh4/cpu.h          |   80 +-
  target/sh4/helper.c       |  236 +++---
  target/sh4/op_helper.c    |   70 +-
  target/sh4/translate.c    | 1466 ++++++++++++++++++-------------------
  5 files changed, 1028 insertions(+), 1028 deletions(-)


@@ -241,17 +241,17 @@ static int find_tlb_entry(CPUSH4State * env, target_ulong address,
      asid = env->pteh & 0xff;
      for (i = 0; i < nbtlb; i++) {
-    if (!entries[i].v)
-        continue;        /* Invalid entry */
-    if (!entries[i].sh && use_asid && entries[i].asid != asid)
-        continue;        /* Bad ASID */
-    start = (entries[i].vpn << 10) & ~(entries[i].size - 1);
-    end = start + entries[i].size - 1;
-    if (address >= start && address <= end) {    /* Match */
-        if (match != MMU_DTLB_MISS)
-        return MMU_DTLB_MULTIPLE;    /* Multiple match */
-        match = i;
-    }
+        if (!entries[i].v)
+            continue; /* Invalid entry */

Thomas, better fix the 'if { }' in this patch or a following one?

Normally I would not mind either way, but this patch is already quite big, so I think it would be better to fix other coding style issues in separate patches. This way, you can also verify with "git show -b" that there are no other unwanted changes in here.

I now also quickly skimmed through the changes and the patch looks fine to me, so:

Reviewed-by: Thomas Huth <th...@redhat.com>

Since the sh4 subsystem currently does not have a maintainer, I'll take the patch for my next pull request.

Thank you for tackling this!

 Thomas


Reply via email to