linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] libata: fix compile error when CONFIG_ATA_BMDMA is not defined
Date: Thu, 10 Nov 2011 09:44:23 -0800	[thread overview]
Message-ID: <4EBC0D77.1000406@xenotime.net> (raw)
In-Reply-To: <1320941426-1100-1-git-send-email-asbjorn@asbjorn.biz>

On 11/10/2011 08:10 AM, Asbjoern Sloth Toennesen wrote:
> 3.2-rc1 and Linus' tree at 5e442a49, fails to compile,
> with CONFIG_SFF defined without CONFIG_ATA_BMDMA.
> 
> The error was introduced by:
>   [ c2036033 ] libata: reduce ata_pci_[sff,bmdma]_init_one() size
> 
> Note this patch have only been compile tested.
> 
> Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>

Thanks.

> ---
>  drivers/ata/libata-sff.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
> index 63d5327..82b1237 100644
> --- a/drivers/ata/libata-sff.c
> +++ b/drivers/ata/libata-sff.c
> @@ -2533,10 +2533,12 @@ static int ata_pci_init_one(struct pci_dev *pdev,
>  	if (rc)
>  		goto out;
>  
> +	#ifdef CONFIG_ATA_BMDMA
>  	if (bmdma)
>  		/* prepare and activate BMDMA host */
>  		rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host);
>  	else
> +	#endif /* CONFIG_ATA_BMDMA */
>  		/* prepare and activate SFF host */
>  		rc = ata_pci_sff_prepare_host(pdev, ppi, &host);
>  	if (rc)
> @@ -2544,10 +2546,12 @@ static int ata_pci_init_one(struct pci_dev *pdev,
>  	host->private_data = host_priv;
>  	host->flags |= hflags;
>  
> +	#ifdef CONFIG_ATA_BMDMA
>  	if (bmdma) {
>  		pci_set_master(pdev);
>  		rc = ata_pci_sff_activate_host(host, ata_bmdma_interrupt, sht);
>  	} else
> +	#endif /* CONFIG_ATA_BMDMA */
>  		rc = ata_pci_sff_activate_host(host, ata_sff_interrupt, sht);
>  out:
>  	if (rc == 0)


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

      reply	other threads:[~2011-11-10 17:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 16:10 [PATCH] libata: fix compile error when CONFIG_ATA_BMDMA is not defined Asbjoern Sloth Toennesen
2011-11-10 17:44 ` Randy Dunlap [this message]

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=4EBC0D77.1000406@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=asbjorn@asbjorn.biz \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).