[lkml]   [2008]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] xfs: #define out unused parameters of xfs_bmap_add_free and xfs_btree_read_bufl
    Adrian Bunk wrote:
    > On Tue, Apr 22, 2008 at 06:17:03PM +0200, Denys Vlasenko wrote:

    >>> 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.
    >> In busybox this trick is used extensively.
    > Busybox does not have more than one million lines changed in
    > one release.
    > In the Linux kernel maintainability is much more important than in
    > smaller projects.
    >> I don't know how to eliminate these unused parameters with less
    >> intervention, but I also don't want to leave it unfixed.
    >> I want to eventually reach the state with no warnings
    >> about unused parameters.
    > The standard kernel pattern in using empty static inline functions (that
    > allow type checking).
    > And I'm not sure whether the number of functions you'd have to change
    > for reaching your goal has four, five or six digits.

    It would be a huge undertaking.

    Just building xfs w/ the warning in place exposes tons of unused
    parameter warnings from outside xfs as well.

    But, if it was deemed important enough, you could go annotate them as
    unused, I suppose, and hack away at it... Does marking as unused just
    shut up the warning or does it let gcc do further optimizations?


     \ /
      Last update: 2008-04-22 19:29    [W:0.021 / U:4.032 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site