* [Newbie-warning] MOD_INC_USE_COUNT usage
@ 2004-01-14 17:20 Tim Cambrant
2004-01-14 18:25 ` Krzysztof Halasa
0 siblings, 1 reply; 3+ messages in thread
From: Tim Cambrant @ 2004-01-14 17:20 UTC (permalink / raw)
To: Linux Kernel Mailing List
With the high risk of being flamed, I send this to LKML. Feel free
to tell me not to if this is a huge no-no, and it won't happen
again.
I was studying some of the warnings that appears when compiling
2.6.1-mm3, and one common warning is the MOD_INC_USE_COUNT macro
being used. Apparently it's deprecated, but if that's the case,
why is it still being used in the kernel?
I googled a bit and found a few discussions about the issue
(mostly concerning the /mm-subsystem) where some people found
it okay to just remove the call to MOD_INC_USE_COUNT totally,
since it is totally unnecessary under 2.5 (and under 2.6 too,
I presume). Since the discussions provided a lot of contradictions
and no solution, I thought asking a question to someone who has
an idea of what this is about might be a good thing.
I'm not asking you to remove this call, but I do want to know
why it shouldn't be removed and what is being done to replace
a function (or macro... whatever it is) that is deprecated. Any
explanations would be gratefully accepted. Thank you.
Since I'm no kernel-hacker (and not much of a coder at all)
don't expect me to understand a lot of jargon, but this question
is being asked because I'm really interested in understanding
the Linux kernel.
So, why shouldn't this patch be applied?:
--- drivers/ide/pci/generic.c.orig 2004-01-14 17:52:35.000000000 +0100
+++ drivers/ide/pci/generic.c 2003-11-24 13:54:01.000000000 +0100
@@ -121,6 +121,7 @@ static int __devinit generic_init_one(st
return 1;
}
ide_setup_pci_device(dev, d);
+ MOD_INC_USE_COUNT;
return 0;
}
Tim Cambrant
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Newbie-warning] MOD_INC_USE_COUNT usage
2004-01-14 17:20 [Newbie-warning] MOD_INC_USE_COUNT usage Tim Cambrant
@ 2004-01-14 18:25 ` Krzysztof Halasa
2004-01-15 13:53 ` Yury V. Umanets
0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Halasa @ 2004-01-14 18:25 UTC (permalink / raw)
To: Tim Cambrant; +Cc: Linux Kernel Mailing List
Tim Cambrant <tim@cambrant.com> writes:
> So, why shouldn't this patch be applied?:
>
> --- drivers/ide/pci/generic.c.orig 2004-01-14 17:52:35.000000000 +0100
> +++ drivers/ide/pci/generic.c 2003-11-24 13:54:01.000000000 +0100
> @@ -121,6 +121,7 @@ static int __devinit generic_init_one(st
> return 1;
> }
> ide_setup_pci_device(dev, d);
> + MOD_INC_USE_COUNT;
> return 0;
> }
It isn't that easy - the module must be marked as being in use this
way or (preferably) another.
--
Krzysztof Halasa, B*FH
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Newbie-warning] MOD_INC_USE_COUNT usage
2004-01-14 18:25 ` Krzysztof Halasa
@ 2004-01-15 13:53 ` Yury V. Umanets
0 siblings, 0 replies; 3+ messages in thread
From: Yury V. Umanets @ 2004-01-15 13:53 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: Tim Cambrant, Linux Kernel Mailing List
On Wed, 2004-01-14 at 21:25, Krzysztof Halasa wrote:
> Tim Cambrant <tim@cambrant.com> writes:
>
> > So, why shouldn't this patch be applied?:
> >
> > --- drivers/ide/pci/generic.c.orig 2004-01-14 17:52:35.000000000 +0100
> > +++ drivers/ide/pci/generic.c 2003-11-24 13:54:01.000000000 +0100
> > @@ -121,6 +121,7 @@ static int __devinit generic_init_one(st
> > return 1;
> > }
> > ide_setup_pci_device(dev, d);
> > + MOD_INC_USE_COUNT;
> > return 0;
> > }
>
> It isn't that easy - the module must be marked as being in use this
> way or (preferably) another.
Hello,
As I can see, this is really redundant to have a MOD_INC_USE_COUNT for
almost all the modules. But this should be checked carefully before
removing ;)
--
umka
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-15 13:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-14 17:20 [Newbie-warning] MOD_INC_USE_COUNT usage Tim Cambrant
2004-01-14 18:25 ` Krzysztof Halasa
2004-01-15 13:53 ` Yury V. Umanets
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox