lkml.org 
[lkml]   [2003]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PnP update - drivers
On Mon, 13 Jan 2003, Linus Torvalds wrote:

>
> On Mon, 13 Jan 2003, Adam Belay wrote:
> >
> > PnP IDE Conversion from Zwane Mwaikambo
>
> This, btw, is _worse_ than the current conversion, as far as I can tell.
> In particular:

I just had a look (and test booted), the current one definitely is better
and less kludgy.

> > -/* Generic initialisation function for ISA PnP IDE interface */
> > +/* Barf bags at the ready! Enough to satisfy IDE core */
> > +static void pnp_to_pci(struct pnp_dev *pnp_dev, struct pci_dev *pci_dev)
> > +{
> > + pci_dev->dev = pnp_dev->dev;
> > + pci_set_drvdata(pci_dev, pnp_get_drvdata(pnp_dev));
> > + pci_dev->irq = DEV_IRQ(pnp_dev, 0);
> > + pci_set_dma_mask(pci_dev, 0x00ffffff);
> > +}
>
> That "pci_dev->dev = pnp_dev->dev" looks totally bletcherous, and does a
> structure copy that potentially copies pointers that simply ARE NOT VALID
> after the copy.
>
> Not good.

Hey, i did offer barf bags ;) I admit, that part is complete bollocks, due
to my bending over for pci_dev.

Zwane
--
function.linuxpower.ca



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.059 / U:4.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site