All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Pierre Habouzit <madcoder@debian.org>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: janitoring
Date: Thu, 23 Jul 2009 09:27:42 +0200	[thread overview]
Message-ID: <4A6810EE.4030902@viscovery.net> (raw)
In-Reply-To: <1248298475-2990-1-git-send-email-madcoder@debian.org>

Pierre Habouzit schrieb:
> [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

      parent reply	other threads:[~2009-07-23  7:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22 21:34 janitoring Pierre Habouzit
2009-07-22 21:34 ` [PATCH 1/3] janitor: use NULL and not 0 for pointers Pierre Habouzit
2009-07-22 21:34   ` [PATCH 2/3] refactor: use bitsizeof() instead of 8 * sizeof() Pierre Habouzit
2009-07-22 21:34     ` [PATCH 3/3] janitor: add DIV_ROUND_UP and use it Pierre Habouzit
2009-07-23  5:07     ` [PATCH 2/3] refactor: use bitsizeof() instead of 8 * sizeof() Jeff King
2009-07-23  5:09       ` Junio C Hamano
2009-07-23  5:11         ` Jeff King
2009-07-23  5:15           ` Junio C Hamano
2009-07-23  6:22         ` Pierre Habouzit
2009-07-22 22:00 ` janitoring Junio C Hamano
2009-07-22 22:02   ` janitoring Pierre Habouzit
2009-07-22 22:19     ` janitoring Junio C Hamano
2009-07-22 22:29   ` janitoring Johannes Schindelin
2009-07-23  7:27 ` Johannes Sixt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A6810EE.4030902@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=madcoder@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.