git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] use DIV_ROUND_UP

From
Jeff King <peff@peff.net>
Date
Jul 11, 2017, 07:41 UTC
Message-ID
<20170711074143.fxedaod3bmsxck2o@sigill.intra.peff.net>
In-Reply-To
<3f643932-0fe1-26b0-d2bf-a2124a74deca@web.de>
On Mon, Jul 10, 2017 at 07:08:38PM +0200, René Scharfe wrote:
Show 9 quoted lines
> > So I think it's a true mechanical conversion, but I have to admit the
> > original is confusing. Without digging I suspect it's correct, though,
> > just because a simple bug here would mean that our ewah bitmaps totally
> > don't work. So it's probably not worth spending time on.
> 
> A few lines below there is "self->bit_size = i + 1", so the code
> calculates how many words the old and the new value are apart (or by how
> many words the bitmap needs to be extended), which becomes easier to see
> with the patch.

Yeah, I'd agree the consistent use of "i + 1" makes the end result after your patch easier to read.

-Peff
Previous: René Scharfe
Message 7 of 7 in “use DIV_ROUND_UP”
  1. use DIV_ROUND_UPRené Scharfe, Jul 8, 2017
  2. Martin ÅgrenJul 9, 2017
  3. René ScharfeJul 9, 2017
  4. Martin ÅgrenJul 9, 2017
  5. Jeff KingJul 10, 2017
  6. René ScharfeJul 10, 2017
  7. Jeff KingJul 11, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.