From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
xun <xun794@gmail.com>,
qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Yoshinori Sato <ysato@users.sourceforge.jp>
Subject: Re: [PATCH] sh4: Coding style: Remove tabs
Date: Sun, 26 Nov 2023 17:31:04 +0100 [thread overview]
Message-ID: <ebfa1132-14e7-4ae1-96f0-b2581d0abb2c@redhat.com> (raw)
In-Reply-To: <2ba80e3f-c13e-406b-a365-37841ff655b4@linaro.org>
On 24/11/2023 16.30, Philippe Mathieu-Daudé wrote:
> 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?
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 <thuth@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
prev parent reply other threads:[~2023-11-26 16:32 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é
2023-11-26 16:31 ` Thomas Huth [this message]
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=ebfa1132-14e7-4ae1-96f0-b2581d0abb2c@redhat.com \
--to=thuth@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=xun794@gmail.com \
--cc=ysato@users.sourceforge.jp \
/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).