public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brown <davidb@codeaurora.org>
To: Daniel Walker <dwalker@fifo99.com>
Cc: Jeff Ohlstein <johlstei@codeaurora.org>,
	Bryan Huntsman <bryanh@codeaurora.org>,
	linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Russell King <linux@arm.linux.org.uk>,
	stable@kernel.org
Subject: Re: [PATCH] msm: timer: compensate for timer shift in msm_read_timer_count
Date: Thu, 09 Jun 2011 16:31:06 -0700	[thread overview]
Message-ID: <8ya1uz2inut.fsf@huya.qualcomm.com> (raw)
In-Reply-To: <1307626910.16418.1.camel@m0nster> (Daniel Walker's message of "Thu, 09 Jun 2011 06:41:50 -0700")

On Thu, Jun 09 2011, Daniel Walker wrote:

>> diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
>> index 38b95e9..b3579fe 100644
>> --- a/arch/arm/mach-msm/timer.c
>> +++ b/arch/arm/mach-msm/timer.c
>> @@ -100,7 +100,7 @@ static cycle_t msm_read_timer_count(struct clocksource *cs)
>>  {
>>  	struct msm_clock *clk = container_of(cs, struct msm_clock, clocksource);
>>  
>> -	return readl(clk->global_counter);
>> +	return readl(clk->global_counter) >> clk->shift;
>>  }
>
> Could you comment in the code with something explaining what the shift
> is doing.

Probably best to describe this near msm_clock's definition (or
MSM_DGT_SHIFT), since it is a bit unclear what these values are.
A good (but short) description of how the shifts and even why.

The comment shouldn't be in the function body (CodingStyle, chapter 8).

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

      reply	other threads:[~2011-06-09 23:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09  3:44 [PATCH] msm: timer: compensate for timer shift in msm_read_timer_count Jeff Ohlstein
2011-06-09 13:41 ` Daniel Walker
2011-06-09 23:31   ` David Brown [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=8ya1uz2inut.fsf@huya.qualcomm.com \
    --to=davidb@codeaurora.org \
    --cc=bryanh@codeaurora.org \
    --cc=dwalker@fifo99.com \
    --cc=johlstei@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=stable@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox