• Nathan Chancellor's avatar
    pcnet32: Mark PM functions as __maybe_unused · 75603a31
    Nathan Chancellor authored
    In certain configurations without power management support, the
    following warnings happen:
    
    ../drivers/net/ethernet/amd/pcnet32.c:2928:12: warning:
    'pcnet32_pm_resume' defined but not used [-Wunused-function]
     2928 | static int pcnet32_pm_resume(struct device *device_d)
          |            ^~~~~~~~~~~~~~~~~
    ../drivers/net/ethernet/amd/pcnet32.c:2916:12: warning:
    'pcnet32_pm_suspend' defined but not used [-Wunused-function]
     2916 | static int pcnet32_pm_suspend(struct device *device_d)
          |            ^~~~~~~~~~~~~~~~~~
    
    Mark these functions as __maybe_unused to make it clear to the compiler
    that this is going to happen based on the configuration, which is the
    standard for these types of functions.
    
    Fixes: a86688fb ("pcnet32: Convert to generic power management")
    Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    75603a31
pcnet32.c 84.4 KB