From: Thiemo Seufer <ths@networkno.de>
To: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
Cc: Takashi Yoshii <yoshii.takashi@renesas.com>,
Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] SH7750/51: add register BCR3, NCR4, PCR, RTCOR, RTCNT, RTCSR, SDMR2, SDMR3 and fix BCR2 support
Date: Mon, 15 Dec 2008 02:08:42 +0100 [thread overview]
Message-ID: <20081215010842.GA12052@networkno.de> (raw)
In-Reply-To: <4945A6D2.8020806@juno.dti.ne.jp>
Shin-ichiro KAWASAKI wrote:
[snip]
>>>>>> Compared to 'if' statement, 'switch-case' might be more easy to
>>>>>> understand, like as follows.
>>>>>> case SH7750_SDMR2 ... SH7750_SDMR2 + SDMR2_REGNB
>>>>> ok elvenif it's a gcc ony extension
>>>> Ah, gccism policy seems not clear in QEMU project.
>>>> This extension is used in many hw/*.c, so I guessed it
>>>> as a QEMU's usual implementation style.
>>>> I hope comments on it from main developers.
>>>>
>>> Yes it will be nice
>>
>> I believe "no new gcc-isms" would be a good policy.
>
> Thank you. I'll follow it.
Be aware that this was only my personal opinion, and not well-stated at
that. From the recent discussion on IRC I believe we have now the rough
consensus:
"Use GCC extensions only when it improves the code significantly".
> So, my suggestion about 'if' vs 'switch-case' is not appropriate.
For the specific patch I believe the 'if' version is better. My opinion
is largely formed by the 'SH7750_SDMR2 + SDMR2_REGNB' term: If this
state doesn't deserve its own name, then it is probably not clear enough
to be used in a case statement.
Thiemo
next prev parent reply other threads:[~2008-12-15 1:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-05 11:49 [Qemu-devel] [PATCH] SH7750/51: add register BCR3, NCR4, PCR, RTCOR, RTCNT, RTCSR, SDMR2, SDMR3 and fix BCR2 support Jean-Christophe PLAGNIOL-VILLARD
2008-12-14 11:37 ` Shin-ichiro KAWASAKI
2008-12-14 14:51 ` Jean-Christophe PLAGNIOL-VILLARD
2008-12-14 15:36 ` Shin-ichiro KAWASAKI
2008-12-14 16:37 ` Jean-Christophe PLAGNIOL-VILLARD
2008-12-14 17:24 ` Thiemo Seufer
2008-12-15 0:37 ` Shin-ichiro KAWASAKI
2008-12-15 1:08 ` Thiemo Seufer [this message]
2008-12-14 17:28 ` Aurelien Jarno
2008-12-17 9:18 ` [Qemu-devel] [PATCH V2] SH7750/51: add register BCR3, BCR4, " Jean-Christophe PLAGNIOL-VILLARD
2008-12-18 15:51 ` Aurelien Jarno
2008-12-18 21:49 ` [Qemu-devel] [PATCH V3] " Jean-Christophe PLAGNIOL-VILLARD
2008-12-18 23:33 ` [Qemu-devel] [PATCH V4] " Jean-Christophe PLAGNIOL-VILLARD
2009-02-07 15:19 ` Aurelien Jarno
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=20081215010842.GA12052@networkno.de \
--to=ths@networkno.de \
--cc=iwamatsu.nobuhiro@renesas.com \
--cc=kawasaki@juno.dti.ne.jp \
--cc=qemu-devel@nongnu.org \
--cc=yoshii.takashi@renesas.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).