[lkml]   [2021]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] auxdisplay: Remove in_interrupt() usage.
Hi Sebastian,

On Mon, Feb 8, 2021 at 6:59 PM Sebastian Andrzej Siewior
<> wrote:
> charlcd_write() is invoked as a VFS->write() callback and as such it is
> always invoked from preemptible context and may sleep.
> charlcd_puts() is invoked from register/unregister callback which is
> preemtible. The reboot notifier callback is also invoked from

preemtible -> preemptible

> preemptible context.
> Therefore there is no need to use `in_interrupt()' to figure out if it
> is save to sleep because it always is.

save -> safe

Does it hurt to have `in_interrupt()`? Future patches could make it so
that it is no longer a preemptible context. Should it be moved to e.g.
a `WARN_ON()` instead?

> Using `schedule()' to schedule (an be friendly to others) is

an -> and

> discouraged and `cond_resched()' should be used instead.
> Remove `in_interrupt()' and use `cond_resched()' to schedule every 32
> iteration if needed.
> Cc: Miguel Ojeda Sandonis <>
> Signed-off-by: Sebastian Andrzej Siewior <>

Cc'ing Geert and Willy too.

Thanks for the patch!


 \ /
  Last update: 2021-02-08 21:12    [W:0.127 / U:1.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site