• Joe Perches's avatar
    tg3: Use different macros for pci_chip_rev_id accesses · 4153577a
    Joe Perches authored
    Upper case macros for various chip attributes are slightly
    difficult to read and are a bit out of characterto the other
    tg3_<foo> attribute functions.
    
    Convert:
    
    GET_ASIC_REV(tp->pci_chip_rev_id)       -> tg3_asic_rev(tp)
    GET_CHIP_REV(tp->pci_chip_rev_id)       -> tg3_chip_rev(tp)
    
    Remove:
    GET_METAL_REV(tp->pci_chip_rev_id)      -> tg3_metal_rev(tp) (unused)
    
    Add:
    tg3_chip_rev_id(tp) for tp->pci_chip_rev_id so access styles
    are similar to tg3_asic_rev and tg3_chip_rev.
    
    These macros are not converted to static inline functions
    because gcc (tested with 4.7.2) is currently unable to
    optimize the object code it produces the same way and code
    is otherwise larger.
    Signed-off-by: default avatarJoe Perches <joe@perches.com>
    Acked-by: default avatarMichael Chan <mchan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4153577a
tg3.h 122 KB