• Ren Zhijie's avatar
    platform/x86: amd-pmc: Fix build error unused-function · 17faaaca
    Ren Zhijie authored
    If CONFIG_SUSPEND and CONFIG_DEBUG_FS are not set.
    
    compile error:
    drivers/platform/x86/amd-pmc.c:323:12: error: ‘get_metrics_table’ defined but not used [-Werror=unused-function]
     static int get_metrics_table(struct amd_pmc_dev *pdev, struct smu_metrics *table)
                ^~~~~~~~~~~~~~~~~
    drivers/platform/x86/amd-pmc.c:298:12: error: ‘amd_pmc_idlemask_read’ defined but not used [-Werror=unused-function]
     static int amd_pmc_idlemask_read(struct amd_pmc_dev *pdev, struct device *dev,
                ^~~~~~~~~~~~~~~~~~~~~
    drivers/platform/x86/amd-pmc.c:196:12: error: ‘amd_pmc_get_smu_version’ defined but not used [-Werror=unused-function]
     static int amd_pmc_get_smu_version(struct amd_pmc_dev *dev)
                ^~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    
    To fix building warning, wrap all related code with CONFIG_SUSPEND or CONFIG_DEBUG_FS.
    Reported-by: default avatarHulk Robot <hulkci@huawei.com>
    Signed-off-by: default avatarRen Zhijie <renzhijie2@huawei.com>
    Link: https://lore.kernel.org/r/20220505121958.138905-1-renzhijie2@huawei.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    17faaaca
amd-pmc.c 23.8 KB