svn commit: r337004 - head/sys/dev/ofw

Alexey Dokuchaev danfe at FreeBSD.org
Tue Jul 31 22:18:42 UTC 2018


On Tue, Jul 31, 2018 at 08:50:50PM +0000, Emmanuel Vadot wrote:
> New Revision: 337004
> URL: https://svnweb.freebsd.org/changeset/base/337004
> 
> Log:
>   ofw_cpu: Add support for getting cpu clock via clock property
>   
>   Nominal Mhz is either expressed via the clock-frequency property
> ...
> +#ifdef EXT_RESOURCES
> +		rv = clk_get_by_ofw_index(dev, 0, 0, &cpuclk);
> +		if (rv == 0) {
> +			rv = clk_get_freq(cpuclk, &freq);
> +			if (rv != 0 && bootverbose)
> +				device_printf(dev,
> +				    "Cannot get freq of property clocks\n");

Why informal "freq" contraction, esp. when it's properly spelled out few
lines below?

> +			if (bootverbose)
> +				device_printf(dev,
> +				    "missing 'clock-frequency' property\n");
>  	} else
>  		sc->sc_nominal_mhz = cell / 1000000; /* convert to MHz */
>  
> +	if (sc->sc_nominal_mhz != 0 && bootverbose)
> +		device_printf(dev, "Nominal frequency %dMhz\n",

I think correct spelling is MHz, not Mhz.  Notice that comment above uses
this spelling.

./danfe


More information about the svn-src-head mailing list