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

Re: janitoring

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jul 23, 2009, 07:27 UTC
Message-ID
<4A6810EE.4030902@viscovery.net>
In-Reply-To
<1248298475-2990-1-git-send-email-madcoder@debian.org>
Pierre Habouzit schrieb:
Show 9 quoted lines
> [PATCH 2/3] refactor: use bitsizeof() instead of 8 * sizeof()
> 
>   use a macro for CHAR_BIT * sizeof(...), I tend to find it more
>   readable than 8 * sizeof(...) in the code. YMMV.
> 
> [PATCH 3/3] janitor: add DIV_ROUND_UP and use it.
> 
>   Just use linux/kernel.h DIV_ROUND_UP(a, b), it's way easier to read
>   than (a + b - 1) / (b).

Quite frankly, using these two macros means that code readers have to learn their meaning although the original code pieces are (IMO) well-known paradigms. Moreover, DIV_ROUND_UP hides that b is evaluated twice. I am not enthused by these patches (though, I don't see a reason to object).

-- Hannes
Previous: Johannes Schindelin
Message 14 of 14 in “janitoring”
  1. Pierre HabouzitJul 22, 2009
  2. 1/3 janitor: use NULL and not 0 for pointers.Pierre Habouzit, Jul 22, 2009
  3. 2/3 refactor: use bitsizeof() instead of 8 * sizeof()Pierre Habouzit, Jul 22, 2009
  4. 3/3 janitor: add DIV_ROUND_UP and use it.Pierre Habouzit, Jul 22, 2009
  5. Jeff KingJul 23, 2009
  6. Junio C HamanoJul 23, 2009
  7. Jeff KingJul 23, 2009
  8. Junio C HamanoJul 23, 2009
  9. Pierre HabouzitJul 23, 2009
  10. Junio C HamanoJul 22, 2009
  11. Pierre HabouzitJul 22, 2009
  12. Junio C HamanoJul 22, 2009
  13. Johannes SchindelinJul 22, 2009
  14. Johannes SixtJul 23, 2009

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.