diff mbox

ata:ahci.c Fix warning: comparison between 'enum <anonymous>' and 'enum <anonymous>'

Message ID 1278167365-16011-1-git-send-email-justinmattock@gmail.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Justin Mattock July 3, 2010, 2:29 p.m. UTC
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>

---
 drivers/ata/ahci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Tejun Heo July 3, 2010, 2:30 p.m. UTC | #1
On 07/03/2010 04:29 PM, Justin P. Mattock wrote:
> 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>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.
Jeff Garzik July 14, 2010, 7:51 a.m. UTC | #2
On 07/03/2010 10:29 AM, Justin P. Mattock wrote:
> 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>
>
> ---
>   drivers/ata/ahci.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index f252253..fe75d8b 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -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);
>

applied


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Justin Mattock July 14, 2010, 1:35 p.m. UTC | #3
On 07/14/2010 12:51 AM, Jeff Garzik wrote:
> On 07/03/2010 10:29 AM, Justin P. Mattock wrote:
>> 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>
>>
>> ---
>> drivers/ata/ahci.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
>> index f252253..fe75d8b 100644
>> --- a/drivers/ata/ahci.c
>> +++ b/drivers/ata/ahci.c
>> @@ -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);
>>
>
> applied
>
>
>

o.k. cool..

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

Patch

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index f252253..fe75d8b 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -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");