LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* cbe_cpufreq.c initialisation
@ 2007-04-03  8:20 Stephen Rothwell
  2007-04-03  8:37 ` [Cbe-oss-dev] " Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2007-04-03  8:20 UTC (permalink / raw)
  To: ppc-dev; +Cc: cbe-oss-dev

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

Hi all,

In cbe_cpufreq_cpu_init, there is this code:

	max_freq = (u32*) get_property(cpu, "clock-frequency", NULL);
        // we need the freq in kHz
        *max_freq /= 1000;

does this really need to modify the property value in place?

--
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Cbe-oss-dev] cbe_cpufreq.c initialisation
  2007-04-03  8:20 cbe_cpufreq.c initialisation Stephen Rothwell
@ 2007-04-03  8:37 ` Benjamin Herrenschmidt
  2007-04-03  8:44   ` Stephen Rothwell
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2007-04-03  8:37 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: ppc-dev, cbe-oss-dev

On Tue, 2007-04-03 at 18:20 +1000, Stephen Rothwell wrote:
> Hi all,
> 
> In cbe_cpufreq_cpu_init, there is this code:
> 
> 	max_freq = (u32*) get_property(cpu, "clock-frequency", NULL);
>         // we need the freq in kHz
>         *max_freq /= 1000;
> 
> does this really need to modify the property value in place?

No, that's obviously a bug...

Ben.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Cbe-oss-dev] cbe_cpufreq.c initialisation
  2007-04-03  8:37 ` [Cbe-oss-dev] " Benjamin Herrenschmidt
@ 2007-04-03  8:44   ` Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2007-04-03  8:44 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: ppc-dev, cbe-oss-dev

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

On Tue, 03 Apr 2007 18:37:31 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Tue, 2007-04-03 at 18:20 +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > In cbe_cpufreq_cpu_init, there is this code:
> >
> > 	max_freq = (u32*) get_property(cpu, "clock-frequency", NULL);
> >         // we need the freq in kHz
> >         *max_freq /= 1000;
> >
> > does this really need to modify the property value in place?
>
> No, that's obviously a bug...

Excellent, because that was the last non-const usage of get_property in
the whole tree :-)

--
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-04-03  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-03  8:20 cbe_cpufreq.c initialisation Stephen Rothwell
2007-04-03  8:37 ` [Cbe-oss-dev] " Benjamin Herrenschmidt
2007-04-03  8:44   ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox