From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965100AbYDVO2w (ORCPT ); Tue, 22 Apr 2008 10:28:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756810AbYDVO2n (ORCPT ); Tue, 22 Apr 2008 10:28:43 -0400 Received: from smtp6.pp.htv.fi ([213.243.153.40]:54771 "EHLO smtp6.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751266AbYDVO2m (ORCPT ); Tue, 22 Apr 2008 10:28:42 -0400 Date: Tue, 22 Apr 2008 17:28:07 +0300 From: Adrian Bunk To: Denys Vlasenko Cc: David Chinner , Eric Sandeen , Alan Cox , Shawn Bohrer , Ingo Molnar , Andrew Morton , Linux Kernel Mailing List , Arjan van de Ven , Thomas Gleixner Subject: Re: [PATCH] xfs: #define out unused parameters of xfs_bmap_add_free and xfs_btree_read_bufl Message-ID: <20080422142807.GD16895@cs181133002.pp.htv.fi> References: <20080419142329.GA5339@elte.hu> <200804221142.00914.vda.linux@googlemail.com> <200804221216.25905.vda.linux@googlemail.com> <200804221320.54147.vda.linux@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <200804221320.54147.vda.linux@googlemail.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 22, 2008 at 01:20:54PM +0200, Denys Vlasenko wrote: > Hi David, > > xfs_bmap_add_free and xfs_btree_read_bufl functions > use some of their parameters only in some cases > (e.g. if DEBUG is defined, or on non-Linux OS :) > > This patch removes these parameters using #define hack > which makes them "disappear" without the need of uglifying > every callsite with #ifdefs. > > Code size difference on 32-bit x86: > 393457 2904 2952 399313 617d1 linux-2.6-xfs6-TEST/fs/xfs/xfs.o > 393441 2904 2952 399297 617c1 linux-2.6-xfs7-TEST/fs/xfs/xfs.o >... Elimination of completely unused parameters makes sense, but IMHO using such #define hacks for minuscule code size and stack usage advantages is not worth it. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed