Re: [PATCH] staging: dgnc: Replace macro with flow control statement by a function

From: Valdis . Kletnieks
Date: Mon Jul 06 2015 - 09:29:11 EST


On Mon, 06 Jul 2015 18:50:12 +0530, Ravi Teja Darbha said:
> Why would you use a macro to avoid code duplication?

The macro does end up putting code in each place it's used.
However, the actual code is in one place rather than open-coded
in multiple places that can diverge over time (somebody patching 2 of
3 instances, and missing 1, for example).

Attachment: pgpjOzlPkY_bq.pgp
Description: PGP signature