Re: [PATCH] printk: Remove obsoleted check for non-existent "user" object
From: Sergey Senozhatsky
Date: Fri Mar 31 2023 - 00:06:11 EST
On (23/03/20 00:02), Stanislav Kinsburskii wrote:
> From: Stanislav Kinsburskii <stanislav.kinsburski@xxxxxxxxx>
>
> The original check for non-null "user" object was introduced by commit
> e11fea92e13f ("kmsg: export printk records to the /dev/kmsg interface") when
> "user" could be NULL if /dev/ksmg was opened for writing.
>
> Subsequent change 750afe7babd1 ("printk: add kernel parameter to control
> writes to /dev/kmsg") made "user" context required for files opened for write,
> but didn't remove now redundant checks for it to be non-NULL.
>
> This patch removes the dead code while preserving the current logic.
>
> Signed-off-by: Stanislav Kinsburskii <stanislav.kinsburski@xxxxxxxxx>
> CC: Petr Mladek <pmladek@xxxxxxxx>
> CC: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
> CC: Steven Rostedt <rostedt@xxxxxxxxxxx>
> CC: John Ogness <john.ogness@xxxxxxxxxxxxx>
> CC: linux-kernel@xxxxxxxxxxxxxxx
Looks like we should be fine
Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>