Re: [PATCH] printk: modify console_unlock with printk-safe macros

From: Andy Shevchenko
Date: Sat Jul 15 2017 - 08:37:01 EST

On Sat, Jul 15, 2017 at 1:36 PM, Pierre Kuo <vichy.kuo@xxxxxxxxx> wrote:
> In commit de6fcbdb68b2 ("printk: convert the rest to printk-safe"), we
> create 4 helper macros to make printk-safe usage easier.
> Here we modify some part of console_unlock with above marcros.

> raw_spin_lock(&logbuf_lock);

...and now we have "orphaned" call to lock.

> - raw_spin_unlock(&logbuf_lock);

> + logbuf_unlock_irqrestore(flags);

Personally I can't say this makes things clearer.

With Best Regards,
Andy Shevchenko