mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
kcsan: Use min() to fix Coccinelle warning.
Courtesy of Thorsten Blum. -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEbK7UrM+RBIrCoViJnr8S83LZ+4wFAmbkUUsTHHBhdWxtY2tA a2VybmVsLm9yZwAKCRCevxLzctn7jGEnD/sEiP5m08fb/edp1witLnAmR3Fs9xif OXju24ny3zyOvuQji6RhbOD9QEEPiM2nnrsjhsfDYdLMlaJ0gn0PFewSQN5T/SqE OfHuWlMH23hZ4Gt3gO1wZBVn3GRcVtLvAzuDm2mnKtAYYjS+GftDMyz68IjCt1RQ KDPtHREjUuwhhWxXgYEKwW9fTF4qPIbjySOQW/Sh1Qghz1Mf2r2Sme8uf4jq69np GlX9Lvij2upiDjrDDScXpwPpqjbTrQV/X1J5bHmlmUw0iZewH9qH2dVAd/wRPOtI O8B1C9FIUjHKgi+WWCwrO+NJrUcA5m3WBIwvdgEADNbd6BXdu9Dd89r3WYVyxQkq fHC0LttnMGKyu9NdYd1ucmwm+OjuLp9CNVES40O3BSxDWJ+qpXBH03mtxJag2ueZ YCuHBxi9iWQxSnAAFqQUUN+yeiI6zfWsARWwTFFwXtXa0Pup1+l84N7RrS4Ov8Ei lios+LG/XUCZsyIFI1EpUkV0fagKb8YYn9hiTNzIqSjz6SwMChNRxAU8fht9g5k3 nDU+sqAb+EJzCd+Rvui0LdbooTl9RE3E3w9hB2cGC3F8wFZ3fxUZWrhR6ARoVFOK f4GpQ1GHu06xvHkSPom2yP7iflVIw7xMFzlDOhWMGpvWazd+I27EAsmlR05qrzAX ZFgosTDpoC6vRA== =pUNC -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
e651e0a473
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user