Re: [PATCH 29/33] serial: 8250: drop DEBUG_AUTOCONF() macro
From: Maciej W. Rozycki
Date: Tue Jun 17 2025 - 07:39:18 EST
On Wed, 11 Jun 2025, Jiri Slaby (SUSE) wrote:
> DEBUG_AUTOCONF() is always disabled (by "#if 0"), so one would need to
> recompile the kernel to use it. And even if they did, they would find
> out it is broken anyway:
> error: variable 'scratch' is used uninitialized whenever 'if' condition is false
This is removing useful debugging aids.
The issue with compilation is related to commit 3398cc4f2b15 ("serial:
8250: Add IIR FIFOs enabled field properly"), which removed the assignment
of IIR to `scratch' (although a path did exist before it that bypassed the
assignment anyway), and can be trivially fixed by bringing the assignment
back and moving the debug statement next to it.
I agree that "#if 0" isn't very useful as it requires patching the source
to activate; changing it to "#ifdef DEBUG" would make more sense nowadays.
Maciej