diff options
| author | Breno Leitao <[email protected]> | 2024-07-09 14:43:59 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-07-12 01:32:48 +0000 |
| commit | a9359e8b0065a76cc11791f668bce3e9c7bf4fef (patch) | |
| tree | fc359197f4f9a35764dd2d8586fa144b8ea5fc37 /drivers/net/netconsole.c | |
| parent | selftests: openvswitch: retry instead of sleep (diff) | |
| download | kernel-a9359e8b0065a76cc11791f668bce3e9c7bf4fef.tar.gz kernel-a9359e8b0065a76cc11791f668bce3e9c7bf4fef.zip | |
net: netconsole: Remove unnecessary cast from bool
The 'enabled' variable is already a bool, so casting it to its value
is redundant.
Remove the superfluous cast, improving code clarity without changing
functionality.
Signed-off-by: Breno Leitao <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/netconsole.c')
| -rw-r--r-- | drivers/net/netconsole.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index ab8a0623b1a1..de0d89e4e4e2 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -344,7 +344,7 @@ static ssize_t enabled_store(struct config_item *item, goto out_unlock; err = -EINVAL; - if ((bool)enabled == nt->enabled) { + if (enabled == nt->enabled) { pr_info("network logging has already %s\n", nt->enabled ? "started" : "stopped"); goto out_unlock; |
