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] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 20 Jan 2007 23:46:18 +0300
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 12/15] ide: make ide_hwif_t.ide_dma_host_on void

Hello again. :-)

Bartlomiej Zolnierkiewicz wrote:

> [PATCH] ide: make ide_hwif_t.ide_dma_host_on void

> * since ide_hwif_t.ide_dma_host_on is called either when drive->using_dma == 1
>   or when return value is discarded make it void, also drop "ide_" prefix
> * make __ide_dma_host_on() void and drop "__" prefix

    Below are some nits which also apply to the previous patch...

> Index: b/drivers/ide/pci/atiixp.c
> ===================================================================
> --- a/drivers/ide/pci/atiixp.c
> +++ b/drivers/ide/pci/atiixp.c
> @@ -101,7 +101,7 @@ static u8 atiixp_dma_2_pio(u8 xfer_rate)
>  	}
>  }
>  
> -static int atiixp_ide_dma_host_on(ide_drive_t *drive)
> +static void atiixp_ide_dma_host_on(ide_drive_t *drive)
>  {

    Would seem logical to get rid of ide_ in this function's name also...

>  	struct pci_dev *dev = drive->hwif->pci_dev;
>  	unsigned long flags;
[...]
> Index: b/drivers/ide/pci/sgiioc4.c
> ===================================================================
> --- a/drivers/ide/pci/sgiioc4.c
> +++ b/drivers/ide/pci/sgiioc4.c
[...]
> @@ -307,13 +307,8 @@ sgiioc4_ide_dma_test_irq(ide_drive_t * d
>  	return sgiioc4_checkirq(HWIF(drive));
>  }
>  
> -static int
> -sgiioc4_ide_dma_host_on(ide_drive_t * drive)
> +static void sgiioc4_ide_dma_host_on(ide_drive_t * drive)

    Same comment here...

>  {
> -	if (drive->using_dma)
> -		return 0;
> -
> -	return 1;
>  }
>  
>  static void sgiioc4_ide_dma_host_off(ide_drive_t * drive)
> @@ -610,7 +605,7 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
>  	hwif->ide_dma_on = &sgiioc4_ide_dma_on;
>  	hwif->dma_off_quietly = &sgiioc4_ide_dma_off_quietly;
>  	hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq;
> -	hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on;
> +	hwif->dma_host_on = &sgiioc4_ide_dma_host_on;
>  	hwif->dma_host_off = &sgiioc4_ide_dma_host_off;
>  	hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq;
>  	hwif->ide_dma_timeout = &__ide_dma_timeout;

    Unrelated note: not sure why this default value needs explicit assignemnt...

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