• Huang Ying's avatar
    PCIe, AER, use pre-generated prefix in error information printing · b64a4414
    Huang Ying authored
    When printing PCIe AER error information, each line is prefixed with
    PCIe device and driver information.  In original implementation, the
    prefix is generated when each line is printed.  In fact, all lines
    share the same prefix.  So this patch pre-generated the prefix, and
    use that one when each line is printed.
    
    In addition to common prefix can be pre-generated, the trailing white
    spaces in string constants and NULLs in char * array constants can be
    removed too.  These can reduce the object file size further.
    
    The size of object file before and after changing is as follow:
    
               text    data     bss     dec
    before:    3038       0       0    3038
    after:     2118       0       0    2118
    Signed-off-by: default avatarHuang Ying <ying.huang@intel.com>
    CC: Jesse Barnes <jbarnes@virtuousgeek.org>
    CC: Zhang Yanmin <yanmin.zhang@intel.com>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    b64a4414
aerdrv_errprint.c 5.61 KB