All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Sergei Shtylylov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org, bzolnier@gmail.com
Subject: Re: [PATCH] IDE: claim extra DMA ports regardless of channel
Date: Tue, 28 Mar 2006 12:41:46 -0800	[thread overview]
Message-ID: <20060328124146.52dbe446.akpm@osdl.org> (raw)
In-Reply-To: <44298947.5090600@ru.mvista.com>

Sergei Shtylylov <sshtylyov@ru.mvista.com> wrote:
>
>  static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int ports)
>   {
>   	printk(KERN_INFO "    %s: BM-DMA at 0x%04lx-0x%04lx",
>  -		hwif->name, base, base + ports - 1);
>  +	       hwif->name, base, base + ports - 1);
>  +
>   	if (!request_region(base, ports, hwif->name)) {
>   		printk(" -- Error, ports in use.\n");
>   		return 1;
>   	}
>  +
>   	hwif->dma_base = base;
>  -	if ((hwif->cds->extra) && (hwif->channel == 0)) {
>  -		request_region(base+16, hwif->cds->extra, hwif->cds->name);
>  -		hwif->dma_extra = hwif->cds->extra;
>  -	}
>  -	
>  +
>  +	if (hwif->cds->extra) {
>  +		hwif->extra_base = base + (hwif->channel ? 8 : 16);
>  +
>  +		if (!hwif->mate || !hwif->mate->extra_ports) {
>  +			if (!request_region(hwif->extra_base,
>  +					    hwif->cds->extra, hwif->cds->name)) {
>  +				printk(" -- Error, extra ports in use.\n");
>  +				release_region(base, ports);
>  +				return 1;
>  +			}
>  +			hwif->extra_ports = hwif->cds->extra;
>  +		}
>  +	}

The printks in this function are odd.  Note how it will print a
non-newline-terminated string and then will print a newline-terminated
string only if there was an error.

Does it all come out right both when errors occur and when they do not?

  reply	other threads:[~2006-03-28 20:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28 19:06 [PATCH] IDE: claim extra DMA ports regardless of channel Sergei Shtylylov
2006-03-28 20:41 ` Andrew Morton [this message]
2006-03-28 20:42   ` Sergei Shtylylov

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=20060328124146.52dbe446.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=sshtylyov@ru.mvista.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.