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: <20090817080853.GC2967@localdomain.by>
Date:	Mon, 17 Aug 2009 11:08:53 +0300
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	akpm@...ux-foundation.org, andi@...stfloor.org,
	rpjday@...shcourse.ca, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] VIDEO: console, use DIV_ROUND_UP

On (08/17/09 10:00), Jiri Slaby wrote:
> On 08/17/2009 10:00 AM, Sergey Senozhatsky wrote:
> > So... In general, ((vc->vc_font.width + 7) >> 3) ==  DIV_ROUND_UP(vc->vc_font.width, 8) - 1;
> 
> ?
> 
Oops, silly me. Somehow I thought about
DIV_ROUND_UP((vc->vc_font.width + 7) , 8). My fault. Sorry.

> #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
> 
> DIV_ROUND_UP(vc->vc_font.width, 8) expands to:
> (((vc->vc_font.width) + (8) - 1) / (8))
> which is pretty printed:
> (vc->vc_font.width + 7) / 8
> and that's equivalent to:
> (vc->vc_font.width + 7) >> 3
> 
> Correct?
Right.

> 
> > Are you sure we really can use DIV_ROUND_UP?
> 
> Yeah, pretty sure.
> 
OK.
Download attachment "signature.asc" of type "application/pgp-signature" (316 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ