linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/10] ide: check drive->present in ide_get_paired_drive()
Date: Sun, 21 Sep 2008 13:56:01 +0400	[thread overview]
Message-ID: <48D61A31.9090203@ru.mvista.com> (raw)
In-Reply-To: <20080726134057.10589.10226.sendpatchset@localhost.localdomain>

Hello.

Bartlomiej Zolnierkiewicz wrote:

> * Change ide_get_paired_drive() to return NULL if peer device
>   is not present and update all users accordingly.
>
> While at it:
>
> * ide_get_paired_drive() -> ide_get_pair_dev()
>   

   Hm, ide_get_mate_dev() appeals to me more.

> * Use ide_get_pair_dev() in cs5530.c, sc1200.c and via82cxxx.c.
>
> There should be no functional changes caused by this patch.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>   

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> Index: b/drivers/ide/pci/cs5530.c
> ===================================================================
> --- a/drivers/ide/pci/cs5530.c
> +++ b/drivers/ide/pci/cs5530.c
> @@ -81,11 +81,11 @@ static void cs5530_set_pio_mode(ide_driv
>  static u8 cs5530_udma_filter(ide_drive_t *drive)
>  {
>  	ide_hwif_t *hwif = drive->hwif;
> -	ide_drive_t *mate = &hwif->drives[(drive->dn & 1) ^ 1];
> +	ide_drive_t *mate = ide_get_pair_dev(drive);
>  	u16 *mateid = mate->id;
>  	u8 mask = hwif->ultra_mask;
>  
> -	if (mate->present == 0)
> +	if (mate == NULL)
>   

   Hum... no == in some places and == isn't very consistent...

MBR, Sergei



  reply	other threads:[~2008-09-21  9:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-26 13:40 [PATCH 01/10] ide: sanitize struct ide_port_ops documentation Bartlomiej Zolnierkiewicz
2008-07-26 13:40 ` [PATCH 02/10] ide: fix EXABYTENEST handling in probe_for_drive() Bartlomiej Zolnierkiewicz
2008-07-26 13:40 ` [PATCH 03/10] ide: enhance ide_busy_sleep() Bartlomiej Zolnierkiewicz
2008-07-26 13:40 ` [PATCH 04/10] ide: remove no longer needed BUG_ON()-s from init_irq() Bartlomiej Zolnierkiewicz
2008-07-26 13:40 ` [PATCH 05/10] ide: remove IDE_CHIPSET_* macros Bartlomiej Zolnierkiewicz
2008-07-26 13:40 ` [PATCH 06/10] ide: remove unused _IDE_C and _IDE_DISK defines Bartlomiej Zolnierkiewicz
2008-07-26 13:40 ` [PATCH 07/10] ide: remove needless drive->present checks from device drivers Bartlomiej Zolnierkiewicz
2008-07-26 13:40 ` [PATCH 08/10] ide: check drive->present in ide_get_paired_drive() Bartlomiej Zolnierkiewicz
2008-09-21  9:56   ` Sergei Shtylyov [this message]
2008-07-26 13:41 ` [PATCH 09/10] ide: use correct data phase for SMART READ DATA / LOG in ide_cmd_ioctl() Bartlomiej Zolnierkiewicz
2008-07-26 13:41 ` [PATCH 10/10] ide: remove CONFIG_IDEDISK_MULTI_MODE Bartlomiej Zolnierkiewicz
2008-07-26 16:18 ` [PATCH 01/10] ide: sanitize struct ide_port_ops documentation Randy Dunlap
2008-07-27 15:03   ` Bartlomiej Zolnierkiewicz

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=48D61A31.9090203@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=bzolnier@gmail.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).