[PATCH v3] [2.6.22] pasemi: cpufreq driver

Olof Johansson olof at lixom.net
Sun Apr 29 14:39:22 EST 2007


On Sun, Apr 29, 2007 at 01:40:59PM +1000, Stephen Rothwell wrote:
> On Sat, 28 Apr 2007 22:50:21 -0400 Dominik Brodowski <linux at dominikbrodowski.net> wrote:
> >
> > Hi,
> > 
> > On Fri, Apr 27, 2007 at 12:46:01AM -0500, Olof Johansson wrote:
> > > +	max_freq = (u32*) get_property(cpu, "clock-frequency", NULL);
> > 
> > (u32) or (32*) ?
> 
> Neither, get_property now returns (void *) so casting is not needed or
> wanted.
> 
> Also, later in the patch, you modify the property value in place.  Do not do this. To help you remember, if you had not done the cast, gcc would have complained because get_property return a const void *.

Yep. It came along over from the cbe_cpufreq driver, which also does
it. I'll post a patch tomorrow or Monday unless someone else beats me
to it (the driver has already been merged).

> Also, get_property is now called of_get_property.

Sure, but keeping up with the API churn during other patch merging is a mess. It's easier to
make one final pass over all new code and fix it up once more later during the merge window.


-Olof



More information about the Linuxppc-dev mailing list