lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SG2PR06MB10389D8C1D30451EC2AE8FF0C3BA0@SG2PR06MB1038.apcprd06.prod.outlook.com>
Date:	Mon, 29 Feb 2016 11:06:34 +0000
From:	Ramesh Shanmugasundaram <ramesh.shanmugasundaram@...renesas.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
CC:	Marc Kleine-Budde <mkl@...gutronix.de>,
	Wolfgang Grandegger <wg@...ndegger.com>,
	Simon Horman <horms@...ge.net.au>,
	Magnus Damm <magnus.damm@...il.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	"linux-renesas-soc@...r.kernel.org" 
	<linux-renesas-soc@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Chris Paterson <Chris.Paterson2@...esas.com>
Subject: RE: [PATCH 1/2] can: rcar_can: Add r8a7795 support

Hi Geert,

> On Mon, Feb 29, 2016 at 10:21 AM, Ramesh Shanmugasundaram
> <ramesh.shanmugasundaram@...renesas.com> wrote:
> > --- a/drivers/net/can/rcar_can.c
> > +++ b/drivers/net/can/rcar_can.c
> > @@ -808,6 +808,10 @@ static int rcar_can_probe(struct platform_device
> *pdev)
> >         priv->regs = addr;
> >         priv->clock_select = clock_select;
> >         priv->can.clock.freq = clk_get_rate(priv->can_clk);
> > +
> > +       /* Use the rounded clock value (nearest kHz) */
> > +       priv->can.clock.freq = 1000 *
> > + DIV_ROUND_UP(priv->can.clock.freq, 1000);
> 
> The comment and the implementation don't match.
> To get the nearest kHz, you have to useDIV_ROUND_CLOSEST().

Thanks Geert. Yes, DIV_ROUND_CLOSEST() would be apt as you pointed out.
I'll be removing this hack when I rebase, as Marc is fixing the algorithm.

Thanks,
Ramesh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ