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] [day] [month] [year] [list]
Message-ID: <1FC56210173BB445BD77F608D6FB8D033C90FB5CC6@HQMAIL03.nvidia.com>
Date:	Tue, 2 Aug 2011 09:50:25 -0700
From:	Rakesh Iyer <riyer@...dia.com>
To:	'Dmitry Torokhov' <dmitry.torokhov@...il.com>,
	Thierry Reding <thierry.reding@...onic-design.de>
CC:	"rydberg@...omail.se" <rydberg@...omail.se>,
	"olof@...om.net" <olof@...om.net>,
	Allen Martin <AMartin@...dia.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>
Subject: RE: [PATCH v1] Input: tegra-kbc - fix computation of polling time

Thanks Dmitry and Thierry.

Regards
Rakesh

> -----Original Message-----
> From: Dmitry Torokhov [mailto:dmitry.torokhov@...il.com]
> Sent: Saturday, July 30, 2011 12:02 PM
> To: Thierry Reding
> Cc: Rakesh Iyer; rydberg@...omail.se; olof@...om.net; Allen Martin; linux-
> kernel@...r.kernel.org; linux-input@...r.kernel.org
> Subject: Re: [PATCH v1] Input: tegra-kbc - fix computation of polling time
> 
> On Sat, Jul 30, 2011 at 12:41:01PM +0200, Thierry Reding wrote:
> > * riyer@...dia.com wrote:
> > > From: Rakesh Iyer <riyer@...dia.com>
> > >
> > > Fix a constant definition and computation of polling time.
> > >
> > > Signed-off-by: Rakesh Iyer <riyer@...dia.com>
> > > ---
> > >  drivers/input/keyboard/tegra-kbc.c |    4 ++--
> > >  1 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
> > > index da3828f..263f6fc 100644
> > > --- a/drivers/input/keyboard/tegra-kbc.c
> > > +++ b/drivers/input/keyboard/tegra-kbc.c
> > > @@ -37,7 +37,7 @@
> > >  #define KBC_ROW_SCAN_DLY	5
> > >
> > >  /* KBC uses a 32KHz clock so a cycle = 1/32Khz */
> > > -#define KBC_CYCLE_USEC	32
> > > +#define KBC_CYCLE_MS	32
> > >
> > >  /* KBC Registers */
> > >
> > > @@ -647,7 +647,7 @@ static int __devinit tegra_kbc_probe(struct platform_device
> *pdev)
> > >  	debounce_cnt = min(pdata->debounce_cnt, KBC_MAX_DEBOUNCE_CNT);
> > >  	scan_time_rows = (KBC_ROW_SCAN_TIME + debounce_cnt) * num_rows;
> > >  	kbc->repoll_dly = KBC_ROW_SCAN_DLY + scan_time_rows + pdata->repeat_cnt;
> > > -	kbc->repoll_dly = ((kbc->repoll_dly * KBC_CYCLE_USEC) + 999) / 1000;
> > > +	kbc->repoll_dly = (kbc->repoll_dly + KBC_CYCLE_MS - 1) / KBC_CYCLE_MS;
> >
> > You might want to consider using DIV_ROUND_UP for this.
> 
> Indeed. Adjusted locally and applied.
> 
> Thanks.
> 
> --
> Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ