* [PATCH 12/12] target/cris: Remove superfluous breaks
@ 2020-07-13 9:05 Yi Wang
2020-07-13 9:39 ` Thomas Huth
0 siblings, 1 reply; 3+ messages in thread
From: Yi Wang @ 2020-07-13 9:05 UTC (permalink / raw)
To: qemu-devel; +Cc: wang.yi59, Liao Pingfang, wang.liang82, xue.zhihong
From: Liao Pingfang <liao.pingfang@zte.com.cn>
Remove superfluous breaks, as there is a "return" before them.
Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/cris/translate.c | 7 +++----
target/cris/translate_v10.inc.c | 2 --
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/target/cris/translate.c b/target/cris/translate.c
index aaa46b5..64a478b 100644
--- a/target/cris/translate.c
+++ b/target/cris/translate.c
@@ -1178,12 +1178,11 @@ static inline void t_gen_zext(TCGv d, TCGv s, int size)
static char memsize_char(int size)
{
switch (size) {
- case 1: return 'b'; break;
- case 2: return 'w'; break;
- case 4: return 'd'; break;
+ case 1: return 'b';
+ case 2: return 'w';
+ case 4: return 'd';
default:
return 'x';
- break;
}
}
#endif
diff --git a/target/cris/translate_v10.inc.c b/target/cris/translate_v10.inc.c
index ae34a0d..7f38fd2 100644
--- a/target/cris/translate_v10.inc.c
+++ b/target/cris/translate_v10.inc.c
@@ -1026,10 +1026,8 @@ static unsigned int dec10_ind(CPUCRISState *env, DisasContext *dc)
switch (dc->opcode) {
case CRISV10_IND_MOVE_M_R:
return dec10_ind_move_m_r(env, dc, size);
- break;
case CRISV10_IND_MOVE_R_M:
return dec10_ind_move_r_m(dc, size);
- break;
case CRISV10_IND_CMP:
LOG_DIS("cmp size=%d op=%d %d\n", size, dc->src, dc->dst);
cris_cc_mask(dc, CC_MASK_NZVC);
--
2.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 12/12] target/cris: Remove superfluous breaks
2020-07-13 9:05 [PATCH 12/12] target/cris: Remove superfluous breaks Yi Wang
@ 2020-07-13 9:39 ` Thomas Huth
2020-09-01 6:41 ` Laurent Vivier
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2020-07-13 9:39 UTC (permalink / raw)
To: Yi Wang, qemu-devel
Cc: xue.zhihong, Edgar E. Iglesias, QEMU Trivial, wang.liang82,
Liao Pingfang
On 13/07/2020 11.05, Yi Wang wrote:
> From: Liao Pingfang <liao.pingfang@zte.com.cn>
>
> Remove superfluous breaks, as there is a "return" before them.
>
> Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> target/cris/translate.c | 7 +++----
> target/cris/translate_v10.inc.c | 2 --
> 2 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/target/cris/translate.c b/target/cris/translate.c
> index aaa46b5..64a478b 100644
> --- a/target/cris/translate.c
> +++ b/target/cris/translate.c
> @@ -1178,12 +1178,11 @@ static inline void t_gen_zext(TCGv d, TCGv s, int size)
> static char memsize_char(int size)
> {
> switch (size) {
> - case 1: return 'b'; break;
> - case 2: return 'w'; break;
> - case 4: return 'd'; break;
> + case 1: return 'b';
> + case 2: return 'w';
> + case 4: return 'd';
> default:
> return 'x';
> - break;
> }
> }
> #endif
> diff --git a/target/cris/translate_v10.inc.c b/target/cris/translate_v10.inc.c
> index ae34a0d..7f38fd2 100644
> --- a/target/cris/translate_v10.inc.c
> +++ b/target/cris/translate_v10.inc.c
> @@ -1026,10 +1026,8 @@ static unsigned int dec10_ind(CPUCRISState *env, DisasContext *dc)
> switch (dc->opcode) {
> case CRISV10_IND_MOVE_M_R:
> return dec10_ind_move_m_r(env, dc, size);
> - break;
> case CRISV10_IND_MOVE_R_M:
> return dec10_ind_move_r_m(dc, size);
> - break;
> case CRISV10_IND_CMP:
> LOG_DIS("cmp size=%d op=%d %d\n", size, dc->src, dc->dst);
> cris_cc_mask(dc, CC_MASK_NZVC);
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 12/12] target/cris: Remove superfluous breaks
2020-07-13 9:39 ` Thomas Huth
@ 2020-09-01 6:41 ` Laurent Vivier
0 siblings, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2020-09-01 6:41 UTC (permalink / raw)
To: Thomas Huth, Yi Wang, qemu-devel
Cc: QEMU Trivial, Edgar E. Iglesias, Liao Pingfang, wang.liang82,
xue.zhihong
Le 13/07/2020 à 11:39, Thomas Huth a écrit :
> On 13/07/2020 11.05, Yi Wang wrote:
>> From: Liao Pingfang <liao.pingfang@zte.com.cn>
>>
>> Remove superfluous breaks, as there is a "return" before them.
>>
>> Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
>> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
>> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> target/cris/translate.c | 7 +++----
>> target/cris/translate_v10.inc.c | 2 --
>> 2 files changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/target/cris/translate.c b/target/cris/translate.c
>> index aaa46b5..64a478b 100644
>> --- a/target/cris/translate.c
>> +++ b/target/cris/translate.c
>> @@ -1178,12 +1178,11 @@ static inline void t_gen_zext(TCGv d, TCGv s, int size)
>> static char memsize_char(int size)
>> {
>> switch (size) {
>> - case 1: return 'b'; break;
>> - case 2: return 'w'; break;
>> - case 4: return 'd'; break;
>> + case 1: return 'b';
>> + case 2: return 'w';
>> + case 4: return 'd';
>> default:
>> return 'x';
>> - break;
>> }
>> }
>> #endif
>> diff --git a/target/cris/translate_v10.inc.c b/target/cris/translate_v10.inc.c
>> index ae34a0d..7f38fd2 100644
>> --- a/target/cris/translate_v10.inc.c
>> +++ b/target/cris/translate_v10.inc.c
>> @@ -1026,10 +1026,8 @@ static unsigned int dec10_ind(CPUCRISState *env, DisasContext *dc)
>> switch (dc->opcode) {
>> case CRISV10_IND_MOVE_M_R:
>> return dec10_ind_move_m_r(env, dc, size);
>> - break;
>> case CRISV10_IND_MOVE_R_M:
>> return dec10_ind_move_r_m(dc, size);
>> - break;
>> case CRISV10_IND_CMP:
>> LOG_DIS("cmp size=%d op=%d %d\n", size, dc->src, dc->dst);
>> cris_cc_mask(dc, CC_MASK_NZVC);
>>
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-01 6:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 9:05 [PATCH 12/12] target/cris: Remove superfluous breaks Yi Wang
2020-07-13 9:39 ` Thomas Huth
2020-09-01 6:41 ` Laurent Vivier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.