Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No-op reassignments shouldn't warn #11

Closed
lovesegfault opened this issue Mar 7, 2023 · 1 comment
Closed

No-op reassignments shouldn't warn #11

lovesegfault opened this issue Mar 7, 2023 · 1 comment

Comments

@lovesegfault
Copy link
Contributor

If two options cause a reassignment, but the value hasn't actually changed, we should not generate a warning.

Given the following script:

load_kconfig_unchecked(kernel_dir .. "/arch/x86/configs/x86_64_defconfig")
ACPI_APEI:satisfy { y, recursive = true }
ACPI_APEI_GHES:satisfy { y, recursive = true }
ACPI_DPTF:satisfy { y, recursive = true }
ACPI_FPDT:satisfy { y, recursive = true }
ACPI_HMAT:satisfy { y, recursive = true }
BPF_LSM:satisfy { y, recursive = true }
CPU_FREQ_DEFAULT_GOV_PERFORMANCE:satisfy { y, recursive = true }
CPU_FREQ_GOV_SCHEDUTIL:satisfy { y, recursive = true }
CRASH_DUMP:set(n)
DEBUG_DEVRES:set(n)
DEBUG_INFO_REDUCED:set(n)
DEBUG_KERNEL:satisfy { y, recursive = true }
DEBUG_STACK_USAGE:set(n)
DETECT_HUNG_TASK:satisfy { y, recursive = true }
DYNAMIC_DEBUG:satisfy { y, recursive = true }
INTEL_IDLE:satisfy { y, recursive = true }
INTEL_RAPL:satisfy { m, recursive = true }
PM_ADVANCED_DEBUG:satisfy { y, recursive = true }
PM_WAKELOCKS:satisfy { y, recursive = true }
POWERCAP:satisfy { y, recursive = true }
RCU_TORTURE_TEST:set(n)
SCHEDSTATS:set(n)
SCHED_DEBUG:satisfy { y, recursive = true }
SUNRPC_DEBUG:satisfy { y, recursive = true }
X86_AMD_PSTATE:satisfy { y, recursive = true }
X86_INTEL_LPSS:satisfy { y, recursive = true }
X86_INTEL_PSTATE:satisfy { y, recursive = true }

You see this warning:

linux-config> warning: reassignment of symbol POWERCAP to Tristate(Yes)
linux-config>   --> /nix/store/ivr7bxami3pcbmvlbvvc0nbmbjk0by98-linux-6.1.13-autokernel.lua:18
linux-config>    |
linux-config> 18 | INTEL_RAPL:satisfy { m, recursive = true }
linux-config>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: previously assigned here to Tristate(Yes)
linux-config>    |                                            hint: this did not change the previous value Boolean(true)
linux-config>    |
linux-config> 21 | POWERCAP:satisfy { y, recursive = true }
linux-config>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: reassigned here to Tristate(Yes)
linux-config>    |                                          hint: this did not change the previous value Boolean(true)
linux-config>    |

But no actual reassignment is taking place, since both eval to Boolean(true)

@oddlama
Copy link
Owner

oddlama commented Mar 8, 2023

True, in most cases it doesn't add any value to report this. I'll look into it.

@oddlama oddlama closed this as completed in d96f451 Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants