summaryrefslogtreecommitdiffstats
path: root/kernel/printk
diff options
context:
space:
mode:
authorLukas Bulwahn <lukas.bulwahn@gmail.com>2020-11-30 13:49:15 +0100
committerPetr Mladek <pmladek@suse.com>2020-12-08 16:31:28 +0100
commit8d143c610b62f2820fbc97dc441d54ac326abe1a (patch)
tree24620032411793121f460b0b309c6854ae55cd43 /kernel/printk
parent584da076866f38ffb952efcc25af039f9551df81 (diff)
downloadlinux-8d143c610b62f2820fbc97dc441d54ac326abe1a.tar.gz
linux-8d143c610b62f2820fbc97dc441d54ac326abe1a.tar.bz2
linux-8d143c610b62f2820fbc97dc441d54ac326abe1a.zip
printk: remove obsolete dead assignment
Commit 849f3127bb46 ("switch /dev/kmsg to ->write_iter()") refactored devkmsg_write() and left over a dead assignment on the variable 'len'. Hence, make clang-analyzer warns: kernel/printk/printk.c:744:4: warning: Value stored to 'len' is never read [clang-analyzer-deadcode.DeadStores] len -= endp - line; ^ Simply remove this obsolete dead assignment here. Link: https://lore.kernel.org/r/20201130124915.7573-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'kernel/printk')
-rw-r--r--kernel/printk/printk.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index fe64a49344bf..6bffb01431dd 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -741,7 +741,6 @@ static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from)
if (LOG_FACILITY(u) != 0)
facility = LOG_FACILITY(u);
endp++;
- len -= endp - line;
line = endp;
}
}