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

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Mon Jul 6 13:28:51 UTC 2015


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).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20150706/816bdad7/attachment-0001.asc>


More information about the devel mailing list