From: Randy Dunlap <randy.dunlap@oracle.com>
To: Trent Piepho <xyzzy@speakeasy.org>
Cc: lkml <linux-kernel@vger.kernel.org>, v4l-dvb-maintainer@linuxtv.org
Subject: Re: [v4l-dvb-maintainer] bttv build error (CONFIG_NET=n)
Date: Wed, 31 Oct 2007 09:23:50 -0700 [thread overview]
Message-ID: <20071031092350.91eae067.randy.dunlap@oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0710310345160.19072@shell4.speakeasy.net>
On Wed, 31 Oct 2007 04:51:45 -0700 (PDT) Trent Piepho wrote:
> On Tue, 30 Oct 2007, Randy Dunlap wrote:
> > drivers/media/video/bt8xx/bttv-cards.c calls ip_compute_csum().
> > However, when CONFIG_NET=n, that produces:
> >
> > ERROR: "ip_compute_csum" [drivers/media/video/bt8xx/bttv.ko] undefined!
> >
> > Config symbol VIDEO_BT848 can be made to depend on NET, or the
> > osprey_eeprom() function can be built depending on some new config
> > symbol, or bttv could have its own checksum function...
>
> The real problem here is that ip_compute_csum is part of lib-y, but is also
> exported for modules. This problem has come up before, for instance your
> patch for csum_partial()
> http://lkml.org/lkml/2007/4/3/209
>
> Or the problem with kasprintf and the lg module:
> http://lkml.org/lkml/2007/9/24/15
>
> The general lib-y vs EXPORT_SYMBOL problem:
> http://lkml.org/lkml/2007/9/25/17
>
> The only reason the net stuff works, is because CONFIG_NET includes igmp.c,
> which can't be compiled as a module. That means ip_compute_csum() will get
> pulled out of the lib.a file for igmp, and thus be present for the net modules
> that use it too. If igmp could be turned off, made a module, or stopped using
> ip_compute_csum(), then the users of ip_compute_csum() that do depend on
> CONFIG_NET would have the same problem as bttv does.
Thanks for the analysis and summary.
(I'm still waiting for those lkml.org links to load... timed out)
> It seems a shame to create a new ip checksum function in the bttv driver when
> a perfectly good one already exists and will already be present in just about
> every kernel out there. Honestly, how common is NET=n and VIDEO_BT848=m
> outside of randconfig?
so just adding "depends on NET" should be OK then?
---
~Randy
next prev parent reply other threads:[~2007-10-31 16:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 5:15 bttv build error (CONFIG_NET=n) Randy Dunlap
2007-10-31 11:51 ` [v4l-dvb-maintainer] " Trent Piepho
2007-10-31 16:23 ` Randy Dunlap [this message]
2007-11-01 8:28 ` Mauro Carvalho Chehab
2007-11-01 14:53 ` Randy Dunlap
2007-11-02 0:39 ` Trent Piepho
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=20071031092350.91eae067.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=v4l-dvb-maintainer@linuxtv.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.