Re: [RFC PATCH 6/6] hwmon: OMAP4: On die temperature sensor driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2011-08-11 at 09:00 -0400, J, KEERTHY wrote:
> On Thu, Aug 11, 2011 at 4:06 PM, Felipe Balbi <balbi@xxxxxx> wrote:

[ ... ]

> >> >> +     temp = omap_temp_sensor_readl(temp_sensor,
> >> >> +                     temp_sensor->registers->bgap_counter);
> >> >> +     temp = (temp & temp_sensor->registers->counter_mask) >>
> >> >> +                     __ffs(temp_sensor->registers->counter_mask);
> >> >
> >> >        temp &= ??
> >> >
> >> >> +     temp = temp * 1000 / (temp_sensor->clk_rate);
> >> >
> >> >        temp *= ??
> >>
> >> Need to multiply the temp with 1000 before dividing.
> >> temp *= evaluates the RHS first and then multiplies LHS.
> >
> > temp *= 1000;
> > temp /= clk_rate;
> >
> 
> Different coding style. I preferred to do it in a single line.
> 
Me too.

Guenter



_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux