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 07/03/2010 02:57 AM, Tejun Heo wrote:
Hello,

On 06/30/2010 09:21 AM, Justin P. Mattock wrote:
What does the extra warning buy us?  There are several places which
use anonymous enums for constants and I can't see what the benefit of
this warning would be.

I don't think it buys us anything..think it's just saying "hey
you have two #defines with the same value" or something in that
area(if Im reading the warning correctly) funny thing is, is
gcc should of done the same with the original patch that I
sent, as well as the second..  (but could be wrong).

Okay, just tested and it's warning that the code is comparing two
enums which are from two different enum blocks.  I'm kind of
doubtful about its usefulness but then again I don't think there
will be many occassions of this to be problematic either.  For
now, can you please submit a patch to cast just ATA_MAX_QUEUE
to (int) before comparing and short comment explanining why it's
necessary?

Thanks.



o.k. so it's what you where asking..

cheers,

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