[PATCH v2 09/10] powerpc: Use ppc_md_progress()

Michael Ellerman mpe at ellerman.id.au
Mon Feb 20 11:42:36 AEDT 2023


Joe Perches <joe at perches.com> writes:
> On Sat, 2023-02-18 at 10:15 +0100, Christophe Leroy wrote:
>> Many places have:
>> 
>> 	if (ppc.md_progress)
>> 		ppc.md_progress();
>> 
>> Use ppc_md_progress() instead.
>> 
>> Note that checkpatch complains about using function names,
>> but this is not a function taking format strings, so we
>> leave the function names for now.
>
> If you are changing almost all of these uses, why not
> drop the unused 2nd argument 'hex' at the same time?

The hex argument is printed by some "progress" implementations.

rtas_progress() will print it to the machine's 7-segment display on some
very old machines. Grepping around I think it might be only old CHRP
machines that use the hex code.

And we only have a handful of sites that actually pass a non-zero hex
code anyway.

So I think we could drop the hex argument.

But the vast bulk of the uses are just printing "foo_setup_arch()" which
is of dubious utility and could probably just be dropped.

If the machine has a working udbg backend then before we get to setup
arch we will have initialised the udbg console, and so all printk
messages should be going to udbg anyway.

cheers


More information about the Linuxppc-dev mailing list