lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8ya1uz2inut.fsf@huya.qualcomm.com>
Date:	Thu, 09 Jun 2011 16:31:06 -0700
From:	David Brown <davidb@...eaurora.org>
To:	Daniel Walker <dwalker@...o99.com>
Cc:	Jeff Ohlstein <johlstei@...eaurora.org>,
	Bryan Huntsman <bryanh@...eaurora.org>,
	linux-arm-msm@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Russell King <linux@....linux.org.uk>, stable@...nel.org
Subject: Re: [PATCH] msm: timer: compensate for timer shift in msm_read_timer_count

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ