Re: [PATCH] xfs: #define out unused parameters of xfs_bmap_add_freeand xfs_btree_read_bufl

From: Eric Sandeen
Date: Tue Apr 22 2008 - 13:26:37 EST


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?

-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/