[lkml]   [2008]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] irda: fix !PNP support in drivers/net/irda/nsc-ircc.c

* David Miller <> wrote:

> From: Ingo Molnar <>
> Date: Sat, 3 May 2008 21:32:23 +0200
> >
> > x86.git testing found the following build failure in latest -git:
> >
> > drivers/built-in.o: In function `nsc_ircc_pnp_probe':
> > nsc-ircc.c:(.text+0xdf1b6): undefined reference to `pnp_get_resource'
> > nsc-ircc.c:(.text+0xdf1d4): undefined reference to `pnp_get_resource'
> > nsc-ircc.c:(.text+0xdf1ee): undefined reference to `pnp_get_resource'
> > nsc-ircc.c:(.text+0xdf237): undefined reference to `pnp_get_resource'
> > nsc-ircc.c:(.text+0xdf24c): undefined reference to `pnp_get_resource'
> > drivers/built-in.o:nsc-ircc.c:(.text+0xdf266): more undefined references to `pnp_get_resource' follow
> > make: *** [.tmp_vmlinux1] Error 1
> I feel there is a better way to fix this and the other IRDA pnp build
> failure.
> linux/pnp.h provides erroring inlines when PNP is disabled, but it
> does not provide a full set. In order to be fully consistent it
> should provide similar stub implementations for things like
> pnp_get_flags() (which is what triggers the reference to
> pnp_get_resource here), for example.
> Either the whole API is provided with stubs when PNP is disabled, or
> none should be. If only some interfaces get the treatment, we get
> messy ifdefs such as those seen in these patches we are discussing.

i just used the existing precedent of doing the #ifdef: it's not _that_
bad as it surrounds a single function most of the time so it's rather
apparent what is happening - and that is what is done in some other
drivers as well.

btw., when i fixed this i almost implemented it the way that you
suggested, but there's also a code size argument to when the suspend
callbacks are not used: the extra dummy function takes up text space,
and people turn off PNP when they build some specialized thing and try
to reduce the size of the kernel.

but in any case, i have no strong feelings in either direction.


 \ /
  Last update: 2008-05-05 10:01    [W:0.035 / U:8.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site