diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-18 08:28:59 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-18 08:28:59 +0200 |
commit | e651e0a47348cea260837ed5b463a489b1e8095e (patch) | |
tree | c660d8b93e76072bd8cc7b790618b80fb1435659 /kernel | |
parent | 067610ebaaec53809794807842a2fcf5f1f5b9eb (diff) | |
parent | 43d631bf06ec961bbe4c824b931fe03be44c419c (diff) |
Merge tag 'kcsan.2024.09.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu
Pull kcsan update from Paul McKenney:
"Use min() to fix Coccinelle warning.
Courtesy of Thorsten Blum"
* tag 'kcsan.2024.09.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
kcsan: Use min() to fix Coccinelle warning
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kcsan/debugfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kcsan/debugfs.c b/kernel/kcsan/debugfs.c index 1d1d1b0e4248..53b21ae30e00 100644 --- a/kernel/kcsan/debugfs.c +++ b/kernel/kcsan/debugfs.c @@ -225,7 +225,7 @@ debugfs_write(struct file *file, const char __user *buf, size_t count, loff_t *o { char kbuf[KSYM_NAME_LEN]; char *arg; - int read_len = count < (sizeof(kbuf) - 1) ? count : (sizeof(kbuf) - 1); + const size_t read_len = min(count, sizeof(kbuf) - 1); if (copy_from_user(kbuf, buf, read_len)) return -EFAULT; |