On 04/09/10 23:53, Benoit PAPILLAULT wrote: > Ivo van Doorn a écrit : >> On Thursday 08 April 2010, Gertjan van Wingerde wrote: >> >>> The rt2800 version constants are inconsistent, and the version number >>> don't >>> mean a lot of things anyway. Use the literal values in the code >>> instead of >>> some sort of fabricated version name macro. >>> >>> Signed-off-by: Gertjan van Wingerde <gwingerde@xxxxxxxxx> >>> >> >> Perhaps a more elegant way of using and defining needs to be found. >> But at least the defined show what the purpose for the values is >> rather then having magical values spread around the code. >> >> Ivo >> >> > Agreed, it's a lot better to avoid hardcoded value. #define adds a > meaning to the numeric value and if such define needs to be changed, > there's only one place to change, avoiding bugs by duplicating hardcoded > values and only changing one instance. > > Even, #define MCS_0 0 is useful :-) > To be honest, I don't think that constants with meaningless names are better or useful. If a constant is used it should have a meaningful name, otherwise it is just as bad as using a magical value. The only change is that it now is a magical name. IMHO that actually worsens the situation as code readers will start thinking about what that name actually means. However, I think I found some sort of scheme that can be used for the version numbers. See my other email to the mailing list. --- Gertjan. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html