All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Amit Tomar <Amit.Tomar@freescale.com>
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v1] [Review Request]  RTC Support in e500
Date: Thu, 18 Dec 2014 23:56:10 +0100	[thread overview]
Message-ID: <54935B8A.6000108@suse.de> (raw)
In-Reply-To: <1418938339720.40668@freescale.com>



On 18.12.14 22:32, Amit Tomar wrote:
> 
> Thank you for reviewing the patches and providing the comments.
> 
> I'm able to follow most of the comments except below two.
>  
>> Is this true for a real MPC8544DS as well? If not, we'll need to conditionalize it to only spawn >the i2c controller (and rtc clock) on the virt machine.
> 
> I could not able to parse the above comments,what I need to check here?
> 
> I checked the MPC8544 dts file ,I2C is present at @3100(will double check it)

Ah, this is already great to hear.

I think we're ok to just assume the specific RTC is attached to the i2c
bus then. So your answer is basically "Yes, this is true for a real
MPC8544DS". Awesome.

> 
>> +    case MPC_I2C_CR:
>> +        if (mpc_i2c_is_enabled(s) && ((value & CCR_MEN) == 0)) {
>> +            mpc_i2c_soft_reset(s);
> 
>  > I think it's fine to do a break here and indent the below 4 bytes less.
> 
> Do you want to have separate function for else, if so what should I name it ?

Right now the code flow is

if (...) {
   foo;
} else {
   bar;
}

where foo is really a special case that doesn't belong into the normal
code flow. Thus I think doing

if (...) {
    foo;
    break;
}

bar;

is more readable.

Also, please make sure to not top post on QEMU mailing lists. We usually
inline responses ;).


Alex

  reply	other threads:[~2014-12-18 22:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BL2PR03MB449F4F9FA02171164275824836D0@BL2PR03MB449.namprd03.prod.outlook.com>
2014-12-18 21:32 ` [Qemu-devel] [PATCH v1] [Review Request] RTC Support in e500 Amit Tomar
2014-12-18 22:56   ` Alexander Graf [this message]
2014-12-08 14:19 Amit Tomar
2014-12-16 12:33 ` Alexander Graf

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=54935B8A.6000108@suse.de \
    --to=agraf@suse.de \
    --cc=Amit.Tomar@freescale.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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 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.