• Wei Yongjun's avatar
    mlx4: Mark PM functions as __maybe_unused · 4e1a6911
    Wei Yongjun authored
    In certain configurations without power management support, the
    following warnings happen:
    
    drivers/net/ethernet/mellanox/mlx4/main.c:4388:12:
     warning: 'mlx4_resume' defined but not used [-Wunused-function]
     4388 | static int mlx4_resume(struct device *dev_d)
          |            ^~~~~~~~~~~
    drivers/net/ethernet/mellanox/mlx4/main.c:4373:12: warning:
     'mlx4_suspend' defined but not used [-Wunused-function]
     4373 | static int mlx4_suspend(struct device *dev_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: 0e3e206a ("mlx4: use generic power management")
    Reported-by: default avatarHulk Robot <hulkci@huawei.com>
    Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4e1a6911
main.c 123 KB