lkml.org 
[lkml]   [2008]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] fix 3c515.c:(.text+0x57200): undefined reference to `pnp_get_resource'

* Randy Dunlap <randy.dunlap@oracle.com> wrote:

> > Signed-off-by: Ingo Molnar <mingo@elte.hu>
>
> Patch is in Jeff's tree.

i see. Hm, as far as i can see the patch was not Cc:-ed to lkml hence i
did not see that it exist and created a patch for it. Please Cc: lkml
for any mainline fix you think other people might trigger.

also, here's some small nitpicking about your patch:

+#ifdef __ISAPNP__
if (idev) {
irq = pnp_irq(idev, 0);
vp->dev = &idev->dev;
} else {
irq = inw(ioaddr + 0x2002) & 15;
}
+#else
+ irq = inw(ioaddr + 0x2002) & 15;
+#endif

as you now unconditonally assume that idev is NULL in the !__ISAPNP__.
Which is true currently but might not be with other changes (which is
unlikely but still). It also duplicates code visually.

So i'd still slightly prefer my patch instead of yours which avoids the
duplication and puts the assumption/constraint straight in there via a
BUG_ON():

> > if (idev) {
> > +#ifdef __ISAPNP__
> > irq = pnp_irq(idev, 0);
> > +#else
> > + /* Can not happen - in the !PNP case we always pass in NULL */
> > + BUG_ON(1);
> > +#endif
> > vp->dev = &idev->dev;
> > } else {
> > irq = inw(ioaddr + 0x2002) & 15;
> > --

no strong feelings though - it's a nitpick and this code is obviously
obsolete.

Ingo


\
 
 \ /
  Last update: 2008-06-20 17:53    [W:2.494 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site