qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: xun <xun794@gmail.com>,
	qemu-devel@nongnu.org, Thomas Huth <thuth@redhat.com>
Cc: qemu-trivial@nongnu.org
Subject: Re: [PATCH] sh4: Coding style: Remove tabs
Date: Fri, 24 Nov 2023 16:30:28 +0100	[thread overview]
Message-ID: <2ba80e3f-c13e-406b-a365-37841ff655b4@linaro.org> (raw)
In-Reply-To: <20231124044554.513752-1-xun794@gmail.com>

Hi,

On 24/11/23 05:45, xun wrote:
> From: Yihuan Pan <xun794@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 <xun794@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?

> +        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;
> +        }
>       }
>       return match;
>   }
> @@ -265,7 +265,7 @@ static void increment_urc(CPUSH4State * env)
>       urc = ((env->mmucr) >> 10) & 0x3f;
>       urc++;
>       if ((urb > 0 && urc > urb) || urc > (UTLB_SIZE - 1))
> -	urc = 0;
> +        urc = 0;
>       env->mmucr = (env->mmucr & 0xffff03ff) | (urc << 10);
>   }



  reply	other threads:[~2023-11-24 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-24  4:45 [PATCH] sh4: Coding style: Remove tabs xun
2023-11-24 15:30 ` Philippe Mathieu-Daudé [this message]
2023-11-26 16:31   ` Thomas Huth

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=2ba80e3f-c13e-406b-a365-37841ff655b4@linaro.org \
    --to=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=xun794@gmail.com \
    /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).