lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 21 Sep 2008 13:56:01 +0400
From:	Sergei Shtylyov <sshtylyov@...mvista.com>
To:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Cc:	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 08/10] ide: check drive->present in ide_get_paired_drive()

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@...il.com>
>   

Acked-by: Sergei Shtylyov <sshtylyov@...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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ