[PATCH 2/3] hwmon: adm9240 updates

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

 



On Tue, 13 Sep 2005 22:40:38 -0400, "Mark M. Hoffman" <mhoffman at lightlink.com> wrote:
>
>Just for reference, here's the whole original function:
>
>orig > static inline int SCALE(long val, int mul, int div)
>orig > {
>orig >         if (val < 0)
>orig >                 return (val * mul - div / 2) / div;
>orig >         else
>orig >                 return (val * mul + div / 2) / div;
>orig > }
>
>So... exactly what value of div would require this fix?

Seein' things, half a div on div == zero, I'll fix it ([with] Jean's 
comments, thanks ;)

Grant.





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

  Powered by Linux