Skip to contentSkip to conversation

platform/x86/amd: pmc: Remove more CONFIG_DEBUG_FS checks

PATCH In review Mario Limonciello 2 participants 2 messages Nov 8, 2022 – Nov 15, 2022 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86/amd: pmc: Remove more CONFIG_DEBUG_FS checks

commit b37fe34c8309 ("platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks") removed most CONFIG_DEBUG_FS checks, but there were some left that were reported to cause compile test failures.

Remove the remaining checks, and also the unnecessary CONFIG_SUSPEND used in the same place.

Reported-by [email protected]
Fixes b37fe34c8309 ("platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks")
---
 drivers/platform/x86/amd/pmc.c | 2 --
 1 file changed, 2 deletions(-)
drivers/platform/x86/amd/pmc.c +0 -2
index 96e790e639a2..3b44f2fff5be 100644
@@ -276,7 +276,6 @@ static const struct file_operations amd_pmc_stb_debugfs_fops_v2 = {
 	.release = amd_pmc_stb_debugfs_release_v2,
 };
 
-#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS)
 static int amd_pmc_setup_smu_logging(struct amd_pmc_dev *dev)
 {
 	if (dev->cpu_id == AMD_CPU_ID_PCO) {
@@ -351,7 +350,6 @@ static int get_metrics_table(struct amd_pmc_dev *pdev, struct smu_metrics *table
 	memcpy_fromio(table, pdev->smu_virt_addr, sizeof(struct smu_metrics));
 	return 0;
 }
-#endif /* CONFIG_SUSPEND || CONFIG_DEBUG_FS */
 
 #ifdef CONFIG_SUSPEND
 static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev)
Signature · 1 line
2.34.1
#1 lore raw

Hi Mario,

Quoted 10 lines · Mario Limonciello

commit b37fe34c8309 ("platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks") removed most CONFIG_DEBUG_FS checks, but there were some left that were reported to cause compile test failures.

Remove the remaining checks, and also the unnecessary CONFIG_SUSPEND used in the same place.

Reported-by [email protected]
Fixes b37fe34c8309 ("platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks")

Thank you for your patch, I've applied this patch to my fixes branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes

Note it will show up in my fixes branch once I've pushed my local branch there, which might take a while.

I will include this patch in my next fixes pull-req to Linus for the current kernel development cycle.

Regards,

Hans

Quoted 24 lines
---
 drivers/platform/x86/amd/pmc.c | 2 --
 1 file changed, 2 deletions(-)
drivers/platform/x86/amd/pmc.c +0 -2
index 96e790e639a2..3b44f2fff5be 100644
@@ -276,7 +276,6 @@ static const struct file_operations amd_pmc_stb_debugfs_fops_v2 = {
 	.release = amd_pmc_stb_debugfs_release_v2,
 };
 
-#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS)
 static int amd_pmc_setup_smu_logging(struct amd_pmc_dev *dev)
 {
 	if (dev->cpu_id == AMD_CPU_ID_PCO) {
@@ -351,7 +350,6 @@ static int get_metrics_table(struct amd_pmc_dev *pdev, struct smu_metrics *table
 	memcpy_fromio(table, pdev->smu_virt_addr, sizeof(struct smu_metrics));
 	return 0;
 }
-#endif /* CONFIG_SUSPEND || CONFIG_DEBUG_FS */
 
 #ifdef CONFIG_SUSPEND
 static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev)