From: mkrufky@linuxtv.org
To: xyzzy@speakeasy.org
Cc: akpm@linux-foundation.org, sfr@canb.auug.org.au,
video4linux-list@redhat.com, torvalds@linux-foundation.org,
efault@gmx.de, linux-kernel@vger.kernel.org,
mchehab@infradead.org, linux-dvb-maintainer@linuxtv.org,
mingo@elte.hu, sam@ravnborg.org, davem@davemloft.net
Subject: Re: [v4l-dvb-maintainer] [patch, -git] drivers/media build fix fo r modular builds
Date: Wed, 30 Apr 2008 18:38:38 -0400 [thread overview]
Message-ID: <4818F4EE.8050004@linuxtv.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0804301442010.9894@shell4.speakeasy.net>
Trent Piepho wrote:
> On Wed, 30 Apr 2008, Andrew Morton wrote:
>
>> Does this make it feel better?
>>
>> --- a/drivers/media/video/tuner-core.c~a
>> +++ a/drivers/media/video/tuner-core.c
>> @@ -40,11 +40,11 @@
>> typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
>> if (__a) { \
>> __r = (int) __a(ARGS); \
>> + symbol_put(FUNCTION); \
>> } else { \
>> printk(KERN_ERR "TUNER: Unable to find " \
>> "symbol "#FUNCTION"()\n"); \
>> } \
>> - symbol_put(FUNCTION); \
>> __r; \
>> })
>>
>
> Should the symbol_put be done at all? When I wrote the code this is based
> on, it would check if FUNCTION failed or not. If it failed, the symbol
was
> put. But if it worked, then one was returned a handle into FUNCTION's
> module, and so the symbol was not put. If it was, the module's refcount
> would be zero but the caller would have a handle into the module.
>
> So if FUNCTION does anything that creates references to the module, and it
> doesn't inc it's own refcount, then the symbol_put shouldn't be done.
>
>
Trent,
The symbol_put is correct in this case. This macro above is called
"tuner_symbol_probe" , used only within tuner-core.c
This macro is used to call the probe function of a tuner sub-module
(tea5761, tea5767, tda8290). Regardless of whether the probe succeeds
or fails, we do the symbol_put. If the probe succeeds, tuner-core will
proceed to dvb_attach(that_tuner_attach, params), which does the actual
module use count increase.
Regards,
Mike
next prev parent reply other threads:[~2008-04-30 22:40 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 21:50 [GIT PATCHES] V4L/DVB updates and fixes for 2.6.26 Mauro Carvalho Chehab
2008-04-29 21:59 ` Linus Torvalds
2008-04-29 23:49 ` [v4l-dvb-maintainer] " Michael Krufky
2008-04-30 0:00 ` Mauro Carvalho Chehab
2008-04-30 7:48 ` [patch, -git] drivers/media build fix for modular builds Ingo Molnar
2008-04-30 7:52 ` David Miller
2008-04-30 8:13 ` Ingo Molnar
2008-04-30 8:27 ` Mike Galbraith
2008-04-30 8:42 ` Mike Galbraith
2008-04-30 8:56 ` Mike Galbraith
2008-04-30 9:20 ` Mike Galbraith
2008-04-30 11:40 ` Andrew Morton
2008-04-30 13:03 ` Mike Galbraith
2008-04-30 14:39 ` [v4l-dvb-maintainer] " Michael Krufky
2008-04-30 15:29 ` Andrew Morton
2008-04-30 15:30 ` Mike Galbraith
2008-04-30 15:34 ` Andrew Morton
2008-04-30 15:39 ` Michael Krufky
2008-04-30 16:01 ` Mike Galbraith
2008-04-30 15:48 ` Mauro Carvalho Chehab
2008-04-30 15:25 ` Mauro Carvalho Chehab
2008-04-30 15:48 ` Mike Galbraith
2008-04-30 16:12 ` Mauro Carvalho Chehab
2008-04-30 16:31 ` Mike Galbraith
2008-04-30 21:35 ` Mauro Carvalho Chehab
2008-04-30 21:52 ` [v4l-dvb-maintainer] " Trent Piepho
2008-04-30 22:38 ` mkrufky [this message]
2008-04-30 9:26 ` Sam Ravnborg
2008-04-30 9:40 ` Mike Galbraith
2008-04-30 10:36 ` Ingo Molnar
2008-04-30 9:25 ` Sam Ravnborg
2008-04-30 9:37 ` Ingo Molnar
2008-04-30 9:55 ` Sam Ravnborg
2008-04-30 8:02 ` [v4l-dvb-maintainer] [GIT PATCHES] V4L/DVB updates and fixes for 2.6.26 Patrick Boettcher
2008-04-30 19:03 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4818F4EE.8050004@linuxtv.org \
--to=mkrufky@linuxtv.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=efault@gmx.de \
--cc=linux-dvb-maintainer@linuxtv.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mingo@elte.hu \
--cc=sam@ravnborg.org \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
--cc=video4linux-list@redhat.com \
--cc=xyzzy@speakeasy.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox