Skip to content

Commit e651e0a

Browse files
committed
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
2 parents 067610e + 43d631b commit e651e0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/kcsan/debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ debugfs_write(struct file *file, const char __user *buf, size_t count, loff_t *o
225225
{
226226
char kbuf[KSYM_NAME_LEN];
227227
char *arg;
228-
int read_len = count < (sizeof(kbuf) - 1) ? count : (sizeof(kbuf) - 1);
228+
const size_t read_len = min(count, sizeof(kbuf) - 1);
229229

230230
if (copy_from_user(kbuf, buf, read_len))
231231
return -EFAULT;

0 commit comments

Comments
 (0)