Skip to contentSkip to conversation

platform/x86:intel/pmc: fix IS_ENABLED() check

PATCH In review Lukas Bulwahn 3 participants 4 messages Sep 24, 2024 – Oct 21, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86:intel/pmc: fix IS_ENABLED() check

From: Lukas Bulwahn <[email protected]>

Commit d7a87891e2f5 ("platform/x86:intel/pmc: fix build regression with pmtimer turned off") accidentally slips in some CONFIG_CONFIG_X86_PM_TIMER (note the duplicated CONFIG prefix) in the IS_ENABLED() check.

Fortunately, ./scripts/checkkconfigsymbols.py notices this accident. Fix up the IS_ENABLED() check with the intended config name.

Fixes d7a87891e2f5 ("platform/x86:intel/pmc: fix build regression with pmtimer turned off")
---
 drivers/platform/x86/intel/pmc/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/intel/pmc/core.c +2 -2
index 0431a599ba26..4387b5103701 100644
@@ -1546,7 +1546,7 @@ static int pmc_core_probe(struct platform_device *pdev)
 			       pmc_core_adjust_slp_s0_step(primary_pmc, 1));
 
 	map = primary_pmc->map;
-	if (IS_ENABLED(CONFIG_CONFIG_X86_PM_TIMER) &&
+	if (IS_ENABLED(CONFIG_X86_PM_TIMER) &&
 	    map->acpi_pm_tmr_ctl_offset)
 		acpi_pmtmr_register_suspend_resume_callback(pmc_core_acpi_pm_timer_suspend_resume,
 							 pmcdev);
@@ -1563,7 +1563,7 @@ static void pmc_core_remove(struct platform_device *pdev)
 	const struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
 	const struct pmc_reg_map *map = pmc->map;
 
-	if (IS_ENABLED(CONFIG_CONFIG_X86_PM_TIMER) &&
+	if (IS_ENABLED(CONFIG_X86_PM_TIMER) &&
 	    map->acpi_pm_tmr_ctl_offset)
 		acpi_pmtmr_unregister_suspend_resume_callback();
 
Signature · 1 line
2.46.1
#1 lore raw
Quoted 6 lines · Lukas Bulwahn

From: Lukas Bulwahn <[email protected]>

Commit d7a87891e2f5 ("platform/x86:intel/pmc: fix build regression with pmtimer turned off") accidentally slips in some CONFIG_CONFIG_X86_PM_TIMER (note the duplicated CONFIG prefix) in the IS_ENABLED() check.

Quoted 7 lines

Fortunately, ./scripts/checkkconfigsymbols.py notices this accident. Fix up the IS_ENABLED() check with the intended config name.

Fixes d7a87891e2f5 ("platform/x86:intel/pmc: fix build regression with

pmtimer turned off")

---

Thanks for fixing my typo!

Acked-by; Arnd Bergmann <[email protected]>

#2 lore raw
In reply to Lukas Bulwahn

Hi,

Lukas, thank you for your patch.

Quoted 11 lines · Lukas Bulwahn

From: Lukas Bulwahn <[email protected]>

Commit d7a87891e2f5 ("platform/x86:intel/pmc: fix build regression with pmtimer turned off") accidentally slips in some CONFIG_CONFIG_X86_PM_TIMER (note the duplicated CONFIG prefix) in the IS_ENABLED() check.

Fortunately, ./scripts/checkkconfigsymbols.py notices this accident. Fix up the IS_ENABLED() check with the intended config name.

Fixes d7a87891e2f5 ("platform/x86:intel/pmc: fix build regression with pmtimer turned off")

I see that d7a87891e2f5 ("platform/x86:intel/pmc: fix build regression with pmtimer turned off") does not exist in Torvald's tree yet.

This comes from http://git.linaro.org/people/daniel.lezcano/linux.git/log/?h=timers/drivers/next

Daniel, I appreciate you picking this up, but now that everything has been merged together again in v6.12-rc1 I would prefer to handle any further changes limited to drivers/platform/x86/intel/ through the pdx86 tree.

Also since this is a build fix it really should be send as a fix fro the 6.12 cycle.

Daniel judging by the timers/drivers/next branch name I guess these are not fixes targeting 6.12, right ?

In that case can you please drop d7a87891e2f5 ("platform/x86:intel/pmc:
fix build regression with pmtimer turned off") ? Then I'll pick that up and squash in this typo fix.

Or if you do plan to send things out as fixes to Linus, then please add this patch too.

Regards,

Hans

Quoted 26 lines
---
 drivers/platform/x86/intel/pmc/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/intel/pmc/core.c +2 -2
index 0431a599ba26..4387b5103701 100644
@@ -1546,7 +1546,7 @@ static int pmc_core_probe(struct platform_device *pdev)
 			       pmc_core_adjust_slp_s0_step(primary_pmc, 1));
 
 	map = primary_pmc->map;
-	if (IS_ENABLED(CONFIG_CONFIG_X86_PM_TIMER) &&
+	if (IS_ENABLED(CONFIG_X86_PM_TIMER) &&
 	    map->acpi_pm_tmr_ctl_offset)
 		acpi_pmtmr_register_suspend_resume_callback(pmc_core_acpi_pm_timer_suspend_resume,
 							 pmcdev);
@@ -1563,7 +1563,7 @@ static void pmc_core_remove(struct platform_device *pdev)
 	const struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
 	const struct pmc_reg_map *map = pmc->map;
 
-	if (IS_ENABLED(CONFIG_CONFIG_X86_PM_TIMER) &&
+	if (IS_ENABLED(CONFIG_X86_PM_TIMER) &&
 	    map->acpi_pm_tmr_ctl_offset)
 		acpi_pmtmr_unregister_suspend_resume_callback();
 
#3 lore raw
In reply to Lukas Bulwahn

Hi,

Quoted 11 lines · Lukas Bulwahn

From: Lukas Bulwahn <[email protected]>

Commit d7a87891e2f5 ("platform/x86:intel/pmc: fix build regression with pmtimer turned off") accidentally slips in some CONFIG_CONFIG_X86_PM_TIMER (note the duplicated CONFIG prefix) in the IS_ENABLED() check.

Fortunately, ./scripts/checkkconfigsymbols.py notices this accident. Fix up the IS_ENABLED() check with the intended config name.

Fixes d7a87891e2f5 ("platform/x86:intel/pmc: fix build regression with pmtimer turned off")

Note the code this modified is being reverted in the pdx86/fixes branch now, see:

https://patchwork.kernel.org/project/platform-driver-x86/patch/[email protected]/

which I have just applied to my review-hans branch and will be in my next pdx86 fixes PR to Linus.

Daniel, this means that once the next pdx86 fixes PR is merged there will be a conflict with commit d7a87891e2f5 ("platform/x86:intel/pmc: fix build regression with pmtimer turned off") from timers/drivers/next. The correct conflict resolution is to just drop the changes since the code which this patches is removed by the revert.

Since this will now no longer apply I'm dropping this from the pdx86 patch queue.

Regards,

Hans

Quoted 26 lines
---
 drivers/platform/x86/intel/pmc/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/intel/pmc/core.c +2 -2
index 0431a599ba26..4387b5103701 100644
@@ -1546,7 +1546,7 @@ static int pmc_core_probe(struct platform_device *pdev)
 			       pmc_core_adjust_slp_s0_step(primary_pmc, 1));
 
 	map = primary_pmc->map;
-	if (IS_ENABLED(CONFIG_CONFIG_X86_PM_TIMER) &&
+	if (IS_ENABLED(CONFIG_X86_PM_TIMER) &&
 	    map->acpi_pm_tmr_ctl_offset)
 		acpi_pmtmr_register_suspend_resume_callback(pmc_core_acpi_pm_timer_suspend_resume,
 							 pmcdev);
@@ -1563,7 +1563,7 @@ static void pmc_core_remove(struct platform_device *pdev)
 	const struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
 	const struct pmc_reg_map *map = pmc->map;
 
-	if (IS_ENABLED(CONFIG_CONFIG_X86_PM_TIMER) &&
+	if (IS_ENABLED(CONFIG_X86_PM_TIMER) &&
 	    map->acpi_pm_tmr_ctl_offset)
 		acpi_pmtmr_unregister_suspend_resume_callback();