Re: [PATCH 1/2] Make the module 'usage' lists be two-way

From: Rusty Russell
Date: Mon May 31 2010 - 21:37:44 EST


On Tue, 1 Jun 2010 05:46:23 am Linus Torvalds wrote:
>
> From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Date: Mon, 31 May 2010 12:19:37 -0700
> Subject: [PATCH 1/2] Make the module 'usage' lists be two-way
>
> When adding a module that depends on another one, we used to create a
> one-way list of "modules_which_use_me", so that module unloading could
> see who needs a module.
>
> It's actually quite simple to make that list go both ways: so that we
> not only can see "who uses me", but also see a list of modules that are
> "used by me".

Thanks Linus, this is a nice cleanup. One minor comment:

> +static int add_module_usage(struct module *a, struct module *b)
> +{
> + int no_warn;
> + struct module_use *use;

These days I tend to use bool for functions which return 1/0 like this.
(Older functions here I haven't churned, but I like it for new functions).
I've frobbed that and put this in my patch queue.

I'll submit it to Linus in the next merge window :)

Thanks,
Rusty.
--
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/