]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[libata] ahci: Fix warning: comparison between 'enum <anonymous>' and 'enum <anonymous>'
authorJustin P. Mattock <justinmattock@gmail.com>
Sat, 3 Jul 2010 14:29:25 +0000 (07:29 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Sun, 1 Aug 2010 23:36:03 +0000 (19:36 -0400)
The below patch casts ATA_MAX_QUEUE to int because GCC will
give a warning message about the two different enum blocks:
  CC      drivers/ata/ahci.o
drivers/ata/ahci.c: In function 'ahci_init_one':
drivers/ata/ahci.c:1045:2: warning: comparison between 'enum <anonymous>' and 'enum <anonymous>'

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/ahci.c

index f2522534ae6327a94678afb080eafc5dac2d9f4c..fe75d8befc3a27aaa5d6c8048cbaa498416c7322 100644 (file)
@@ -1042,7 +1042,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        VPRINTK("ENTER\n");
 
-       WARN_ON(ATA_MAX_QUEUE > AHCI_MAX_CMDS);
+       WARN_ON((int)ATA_MAX_QUEUE > AHCI_MAX_CMDS);
 
        if (!printed_version++)
                dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");