lkml.org 
[lkml]   [2023]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ssb-main: Fix division by zero in ssb_calc_clock_rate()
On Thu, 31 Aug 2023 10:07:33 +0300 (MSK)
Ранд Дееб <deeb.rand@confident.ru> wrote:

> 1- Yes, I agree that your solution is simpler, and I thought about
> it, but I thought that the one who set the value zero put it for some
> reason, so I did not want to change it.


Yes, I understand your reasoning and I had the same thought initially.
But I looked into the code and I am pretty sure that there is no reason
for the default case returning 0.
In fact, I think returning a 1 as default makes much more sense as the
default value for a factor.

Changing this from 0 to 1 will get my ack.

--
Michael Büsch
https://bues.ch/
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-08-31 18:07    [W:0.052 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site