Re: [PATCH v2]ata:ahci.c Fix warning: comparison between 'enum <anonymous>' and 'enum <anonymous>'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/29/2010 11:49 PM, Tejun Heo wrote:
Hello,

On 06/30/2010 08:37 AM, Justin P. Mattock wrote:
The below patch fixes a warning message during compiling of the kernel
   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@xxxxxxxxx>

Hmm, is this something we wanna go around the kernel and updating
sources?  Or should we just flick a gcc option?


the flick a gcc option seems easier todo, but my guess its probably not the right way of dealing with the issue(even a warning).

@@ -1038,11 +1038,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
  	struct device *dev =&pdev->dev;
  	struct ahci_host_priv *hpriv;
  	struct ata_host *host;
-	int n_ports, i, rc;
+	int n_ports, i, rc, sum = AHCI_MAX_CMDS;

  	VPRINTK("ENTER\n");

-	WARN_ON(ATA_MAX_QUEUE>  AHCI_MAX_CMDS);
+	WARN_ON(ATA_MAX_QUEUE>  sum);

And, just do WARN_ON((int)ATA_MAX_QUEUE>  (int)AHCI_MAX_CMDS)

Thanks.


that builds clean. keep in mind I just compile tested, no rebooting or anything. Should I just resend with what you posted, and call it that, or is this something that needs more?

Justin P. Mattock
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux