From: Wolfgang Denk Date: Sat, 01 Nov 2008 15:40:34 +0100 Subject: [U-Boot] [PATCH] Added a do_div() wrapper macro, lldiv(). In-Reply-To: <200811011404.mA1E4J91008389@wooster.emcraft.com> References: <200811011404.mA1E4J91008389@wooster.emcraft.com> Message-ID: <20081101144034.9DC33832E40C@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Sergei, In message <200811011404.mA1E4J91008389@wooster.emcraft.com> you wrote: > > Subject: [PATCH] Added a do_div() wrapper macro, lldiv(). > The new macro doesn't modify the dividend and returns the result of division, > so it is useful in complex expressions, i.e. "return(a/b)" -> "return(lldiv(a,b))" Instead of a macro, please make this an inline function (which is better as it allows for examply more strict type checking by the compiler). Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de e-credibility: the non-guaranteeable likelihood that the electronic data you're seeing is genuine rather than somebody's made-up crap. - Karl Lehenbauer