All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Rupjyoti Sarmah <rsarmah@amcc.com>,
	linux-ide@vger.kernel.org, sr@denx.de,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] 460EX on-chip SATA driver<kernel 2.6.33> < resubmission : 02>
Date: Wed, 07 Apr 2010 17:41:56 +1000	[thread overview]
Message-ID: <1270626116.2300.68.camel@pasglop> (raw)
In-Reply-To: <4BBB5045.5020004@pobox.com>

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.



WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: sr@denx.de, linux-ide@vger.kernel.org,
	Rupjyoti Sarmah <rsarmah@amcc.com>,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] 460EX on-chip SATA driver<kernel 2.6.33> < resubmission : 02>
Date: Wed, 07 Apr 2010 17:41:56 +1000	[thread overview]
Message-ID: <1270626116.2300.68.camel@pasglop> (raw)
In-Reply-To: <4BBB5045.5020004@pobox.com>

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.

  reply	other threads:[~2010-04-07  7:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-06 11:41 [PATCH] 460EX on-chip SATA driver<kernel 2.6.33> < resubmission : 02> Rupjyoti Sarmah
2010-04-06 11:41 ` Rupjyoti Sarmah
2010-04-06 15:16 ` Jeff Garzik
2010-04-06 15:16   ` Jeff Garzik
2010-04-07  7:41   ` Benjamin Herrenschmidt [this message]
2010-04-07  7:41     ` Benjamin Herrenschmidt
2010-04-07  8:22     ` Stefan Roese
2010-04-07  8:22       ` Stefan Roese
2010-04-07  7:57   ` Rupjyoti Sarmah
2010-04-07  7:57     ` Rupjyoti Sarmah
2010-04-07  7:57     ` Rupjyoti Sarmah

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=1270626116.2300.68.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=rsarmah@amcc.com \
    --cc=sr@denx.de \
    /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.