Re: [RFC/PATCH] Per-device parameter support (4/16)

From: Rusty Russell
Date: Sun Oct 24 2004 - 23:47:11 EST


On Sat, 2004-10-23 at 13:25 +0900, Tejun Heo wrote:
> dp_04_module_param_ranged.diff
>
> This is the 4th patch of 16 patches for devparam.
>
> This patch implements module_param_flag() and module_param_invflag().
> They appear as boolean parameter to the outside, and bitwise OR the
> specified flag to flags when the specified boolean value is 1 and 0
> respectively.

Comment is wrong, of course: this patch adds range to the kernel_param
structure. But I'm not convinced that it's a great idea. It could be
added using the same method (kp->arg) used to extend the others instead.

(Same logic applied to spinlocking param variants).

It comes down to usage: currently there are few range-needing users, but
maybe that's because MODULE_PARM didn't support it. So I would drop
this or implement it as a wrapper, and later we can add it when it takes
over the world. Although I'd probably just add args to
module_param_call: I like having it as the "base".

The other thing is the min=1 max=0 case: I'd prefer INT_MAX, INT_MIN
etc. instead I think so there's no special cases.

Thanks!
Rusty.
--
A bad analogy is like a leaky screwdriver -- Richard Braakman

-
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/