Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756177AbbGFN3H (ORCPT ); Mon, 6 Jul 2015 09:29:07 -0400 Received: from outbound.smtp.vt.edu ([198.82.183.121]:38168 "EHLO omr2.cc.vt.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755067AbbGFN3D (ORCPT ); Mon, 6 Jul 2015 09:29:03 -0400 X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6+dev To: Ravi Teja Darbha Cc: Sudip Mukherjee , Arjun Krishna Babu , devel@driverdev.osuosl.org, lidza.louina@gmail.com, driverdev-devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Subject: Re: [PATCH] staging: dgnc: Replace macro with flow control statement by a function In-Reply-To: Your message of "Mon, 06 Jul 2015 18:50:12 +0530." <20150706132012.GA5180@gmail.com> From: Valdis.Kletnieks@vt.edu References: <1436120188-15368-1-git-send-email-arjunkrishnababu96@gmail.com> <20150706121524.GB2226@gmail.com> <20150706122705.GA3285@sudip-PC> <20150706132012.GA5180@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1436189331_2178P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Mon, 06 Jul 2015 09:28:51 -0400 Message-ID: <34054.1436189331@turing-police.cc.vt.edu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1614 Lines: 39 --==_Exmh_1436189331_2178P Content-Type: text/plain; charset=us-ascii 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). --==_Exmh_1436189331_2178P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Exmh version 2.5 07/13/2001 iQIVAwUBVZqCkwdmEQWDXROgAQIbHxAAr+5xn1zaWYGopiYX3BiYwOggAUnly8ud MN6X9VomWCEMNsPEyyTcibiDTFeZ2aO7KtC/UOViBWBiyl735y9X1nZTa9wbRiMU yckkKy2DHOE/LBt8EY2kyMcBQumKB7GvFGPmI9xV8x+XGDdUrRiD+Bj19vhxAF2A Ekc7zzpL2nPeWCUdW+vVudAymKVvLVLu8GCD+sCaxAGI4Iao5yizWgI0zc3s+1e4 fpLIRtoeYol3nKaFbICJ94UllY3lTQKlZxUlQeY64a3278j/4xAOlosAJPk73/sK p9q8LcsdgXYoq1++CZyD/5tI7iGBsp7f5gphjuSaMM0yflrJoG/qUjgrxYLwDzIb KLhWC7GjsXD8rOXKjur34rZYz++BFD/KG9qkcv2qcKKoVFJcTcp/0w8h3NbQPwNQ PZiGLPPbUo2fn7C37Vg+rB8BL7a2wCpAATGsDKTy6GyF+1qLA+e0eN14OvLnXJxT fv+Y0pAtrh/kIUB6bDgPKPRpxW/nKmCldARthJEjUNEk6yjijpHIZFTDO3oMGbvL 5QlyCFSaNtWmhu930OkPc6v7Bg9kV+OH0OGc76DChRsXwXkacRN+pAL0PadsNI0y YQTXEPjaMAhYABhAE2BXBftUkBBm3wNmoHeCOHjQTol3N0i66xWmzkcGWpAaDfvT Dg+7qXCM4nQ= =ycB9 -----END PGP SIGNATURE----- --==_Exmh_1436189331_2178P-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/