lkml.org 
[lkml]   [2008]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] xfs: #define out unused parameters of xfs_bmap_add_free and xfs_btree_read_bufl
    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.

    We don't use pre-processor hacks to hide function variables for different
    config options. The XFS header files are messy enough without adding
    additional redefinitions of function types to them.

    w.r.t xfs_bmap_add_free(), the correct thing to do is to factor the
    debug code out into a different function that is only compiled
    on debug kernels and remove all the debug checks from xfs_bmap_add_free().

    As it is, I don't think that the change is worth the maintenance
    cost for a few bytes of stack space in non-critical paths.

    Cheers,

    Dave.
    --
    Dave Chinner
    Principal Engineer
    SGI Australian Software Group


    \
     
     \ /
      Last update: 2008-04-23 00:45    [W:2.529 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site