[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46D54CF6.7060009@garzik.org>
Date:	Wed, 29 Aug 2007 06:39:50 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	HighPoint Linux Team <linux@...hpoint-tech.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	James.Bottomley@...elEye.com
Subject: Re: [PATCH] hptiop: adding new firmware interface and more PCI device
 IDs
HighPoint Linux Team wrote:
> +	if (hba->firmware_version > 0x01020000 || hba->interface_version > 0x01020000) {
[...]
> +	if (hba->firmware_version > 0x01020000 ||
> +				hba->interface_version > 0x01020000) {
Rather than repeating this test, you should do it once at probe time, 
and set a "new interface" single-bit flag in some hptiop_hba field.
Less maintenance intensive, less prone to error, and removes expensive 
tests from the driver hotpath.
>  static struct pci_device_id hptiop_id_table[] = {
> -	{ PCI_DEVICE(0x1103, 0x3220) },
> -	{ PCI_DEVICE(0x1103, 0x3320) },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x3220) },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x3320) },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x3520) },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x4320) },
>  	{},
Using the PCI_VDEVICE() macro can make this even shorter:
	{ PCI_VDEVICE(TTI, 0x4320) }
Regards,
	Jeff
-
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
 
