All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: saeed bishara <saeed.bishara@gmail.com>
Cc: linux-ide@vger.kernel.org, Saeed Bishara <saeed@marvell.com>,
	Mark Lord <liml@rtr.ca>
Subject: Re: [PATCH 1/2] [libata] sata_mv: Remove PCI dependency
Date: Wed, 16 Jan 2008 05:01:57 -0500	[thread overview]
Message-ID: <478DD615.1050309@garzik.org> (raw)
In-Reply-To: <c70ff3ad0712250842n5c5383b1x2f53406fbf34dfb5@mail.gmail.com>

saeed bishara wrote:
> -	if (unlikely(irq_stat & PCI_ERR)) {
> +	if (unlikely(irq_stat & PCI_ERR) && HAS_PCI(host)) {
>  		mv_pci_error(host, mmio);
>  		handled = 1;
>  		goto out_unlock;	/* skip all other HC irq handling */

the unlikely() should cover the entire expression.



>  static int __init mv_init(void)
>  {
> -	return pci_register_driver(&mv_pci_driver);
> +	int rc;
> +#ifdef CONFIG_PCI
> +	rc = pci_register_driver(&mv_pci_driver);
> +	if (rc)
> +		return rc;
> +#endif
> +	return 0;
>  }

I would do

{
	int rc = -ENODEV;

	#ifdef CONFIG_PCI
	rc = pci_register_driver(...);
	#endif

	return rc;
}

to ensure sane non-SoC, non-PCI behavior (which this patch now enables).

Finally, in Kconfig, even when removing the CONFIG_PCI dependency, the 
driver suddenly has other unsatified dependencies:  CONFIG_HAS_DMA and 
CONFIG_HAS_IOMEM.  Those two need to be added to the Kconfig dep list.

I would have made these minor corrections myself, but git-am (main 
kernel patch-apply tool, for git users) doesn't seem to like the patch:

Applying sata_mv: Remove PCI dependency

fatal: corrupt patch at line 59



  parent reply	other threads:[~2008-01-16 10:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-02 15:43 [PATCH 0/2] [libata] sata_mv: Add support for Marvell's integrated SATA controller saeed.bishara
2007-12-02 15:43 ` [PATCH 1/2] [libata] sata_mv: Remove PCI dependency saeed.bishara
2007-12-02 15:43   ` [PATCH 2/2] [libata] sata_mv: Support integrated controllers saeed.bishara
2007-12-18 22:02     ` Jeff Garzik
2007-12-18 21:57   ` [PATCH 1/2] [libata] sata_mv: Remove PCI dependency Jeff Garzik
2007-12-18 21:58   ` Jeff Garzik
2007-12-25 16:42     ` saeed bishara
2008-01-09 11:59       ` saeed bishara
2008-01-10  4:35         ` Jeff Garzik
2008-01-16 10:01       ` Jeff Garzik [this message]
2008-01-16 16:17         ` saeed bishara
2008-01-16 19:01           ` Mark Lord
2008-01-17 14:24             ` saeed bishara
2008-01-29 17:12               ` Jeff Garzik
2008-01-29 17:17                 ` saeed bishara
2008-01-21  7:31         ` Tejun Heo
2008-01-23  4:04           ` Jeff Garzik
2008-01-23  4:15             ` Tejun Heo
2008-01-29  8:51             ` saeed bishara
2008-01-29 16:20               ` Mark Lord
2008-01-29 16:28                 ` Jeff Garzik
2008-01-29 16:26               ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2007-12-02 15:26 [PATCH 0/2] [libata] sata_mv: Add support for Marvell's integrated SATA controller saeed.bishara
2007-12-02 15:26 ` [PATCH 1/2] [libata] sata_mv: Remove PCI dependency saeed.bishara
2007-12-04  9:07   ` saeed bishara
2007-12-05 12:11   ` saeed bishara

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=478DD615.1050309@garzik.org \
    --to=jeff@garzik.org \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=saeed.bishara@gmail.com \
    --cc=saeed@marvell.com \
    /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.