Re: [RFC PATCH] printk: console: Allow each console to have its own loglevel

Chris Down
2022-05-19T17:55:42Z

Greg Kroah-Hartman writes:
>> So, just to try to come to a solution, here's the lay of the land as I
>> understand it. Currently pretty much all consoles are statically defined
>> (and most of the non-static cases are false positives)
>>
>> % git grep 'struct console.*=' -- '*.c' | awk '/static/ { print "static"; } !/static/ { print "non-static" }' | sort | uniq -c
>> 15 non-static
>> 105 static
>
>ah, ok, then we have a problem, and your change to the struct device
>being a pointer is correct.
>
>That's the problem when you only see a tiny bit of the kernel in a
>patch, sorry for the confusion.

No worries! Just glad we got to the bottom of it :-)

>But you still need to free the device structure that is pointed to by
>the device in the release function. Your release function can not be
>"empty" like your original patch was.

Great, then I'll implement it like the earlier diff I posted unless you have
any objections.

Thanks a lot for your help and advice!