[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1270626116.2300.68.camel@pasglop>
Date: Wed, 07 Apr 2010 17:41:56 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Jeff Garzik <jgarzik@...ox.com>
Cc: Rupjyoti Sarmah <rsarmah@...c.com>, linux-ide@...r.kernel.org,
sr@...x.de, linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org
Subject: Re: [PATCH] 460EX on-chip SATA driver<kernel 2.6.33> <
resubmission : 02>
On Tue, 2010-04-06 at 11:16 -0400, Jeff Garzik wrote:
> > +static irqreturn_t dma_dwc_interrupt(int irq, void *hsdev_instance)
> > +{
> > + int chan;
> > + u32 tfr_reg, err_reg;
> > +
> > + struct sata_dwc_device *hsdev =
> > + (struct sata_dwc_device *) hsdev_instance;
> > + struct ata_host *host = (struct ata_host *) hsdev->host;
> > + struct ata_port *ap;
> > + struct sata_dwc_device_port *hsdevp;
> > + u8 tag = 0;
> > + unsigned int port = 0;
> > + struct sata_dwc_host_priv *hp;
> > + hp = kmalloc(sizeof(*hp), GFP_KERNEL);
>
> 1) interrupt is not GFP_KERNEL
>
> 2) you must failure kmalloc failure
>
> 3) it is not clear to me where you initialize this structure???
And why the heck would you want to allocate it at interrupt time ? ? ?
BTW. Stefan mentioned earlier that they had some fixes for that driver
in the Denx tree. Are those fixes now included in that variant ?
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists