On 15/03/05 08:38 -0500, Salyzyn, Mark wrote:
> I have to reject this change since pci_module_init() has a different
> return code than pci_register_driver().

pci.h: #define pci_module_init pci_register_driver

pci-driver.c: pci_register_driver:
        "Returns a negative value on error, otherwise 0."

So... since it can't return positive number, these conditions are the same.


> 
> The patch should look like:
> 
> -     error = pci_module_init(&aac_pci_driver);
> +     error = pci_register_driver(&aac_pci_driver);
> -     if (error)
> +     if (error < 0)
>               return error;
> 
> Sincerely -- Mark Salyzyn
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Sunday, March 06, 2005 5:27 PM
> To: [EMAIL PROTECTED]
> Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [patch 06/11] drivers/scsi/aacraid/*: convert to
> pci_register_driver
> 
> 
> convert from pci_module_init to pci_register_driver
> (from:http://kerneljanitors.org/TODO).
> 
> Signed-off-by: Christophe Lucas <[EMAIL PROTECTED]>
> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
> ---
> 
> 
>  kj-domen/drivers/scsi/aacraid/linit.c |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff -puN
> drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
> drivers/scsi/aacraid/linit.c
> ---
> kj/drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
> 2005-03-05 16:12:51.000000000 +0100
> +++ kj-domen/drivers/scsi/aacraid/linit.c     2005-03-05
> 16:12:51.000000000 +0100
> @@ -690,7 +690,7 @@ static int __init aac_init(void)
>       printk(KERN_INFO "Red Hat/Adaptec aacraid driver (%s %s)\n",
>                       AAC_DRIVER_VERSION, AAC_DRIVER_BUILD_DATE);
>  
> -     error = pci_module_init(&aac_pci_driver);
> +     error = pci_register_driver(&aac_pci_driver);
>       if (error)
>               return error;
>  
> _
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to