Xtensa updates for v6.18

- minor cleanups
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEK2eFS5jlMn3N6xfYUfnMkfg/oEQFAmjpRRUTHGpjbXZia2Jj
 QGdtYWlsLmNvbQAKCRBR+cyR+D+gROh0EACCnQr0uHPAMwtOysRpB/GQJbdOfv6P
 qg3tomJUnlTLoHveLJWNVn9A/DaAUBHuckgkJHYrRsYUNFBF0Chv8VX9QX0K9I73
 UZ3zfPMPqqEqKidLOfFaOrECnKp1IqHLphctxBSCCmBRCm/yFMKCpphwtJhAzBGO
 aF6bmwYphNAmQEbytz1yl1PMLf205orDUPT+xXUt207r2tPimTlyDIlgSt3nOx7u
 kHnkQXXNUpNqBpCg3DFv1xOtZUtQzF/n7h0FQ+Zlarm1b9I2tW24SWavFu37YqKV
 6s9UhiMfAgawm8U7lt2X/IGOFW4G0diQJCFATv9mdDPK1TSDKJY4/pQ6rpGzyE6c
 uGLh/avBRg7fEspUBxXcxdmW9cLql4i/K3EcPd5jg2vVCO+t+/9TBtToLFl6Ujxp
 UqMUZeSy7duGTqrO1g8S0x7Qu1tBSL9GbMgNZLd1N0aOzVyxF0Wbc68sEsGfGnF/
 4mPTzTXWIL9wcEQGfYB9QciWWdD/csE8OFgDImHPi57FWR3wXY+MdTyUQA2micwM
 MmP3gpQGIrtw3DhVO+95195+m8zLN8bW4obk6AZzSCLpedUliaxJmb92QPZnY4+M
 cT3vyXeW8C3FLAgIYFK+O/NjgDWgSsfNjLFnWg8k0FDjT0naR/zaY7tCmNU8uSAH
 YOvCEknOBeYVQQ==
 =ZBiX
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-20251010' of https://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa updates from Max Filippov:

 - minor cleanups

* tag 'xtensa-20251010' of https://github.com/jcmvbkbc/linux-xtensa:
  xtensa: use HZ_PER_MHZ in platform_calibrate_ccount
  xtensa: simdisk: add input size check in proc_write_simdisk
This commit is contained in:
Linus Torvalds 2025-10-10 11:20:19 -07:00
commit 917167ed12
2 changed files with 8 additions and 3 deletions

View File

@ -14,6 +14,7 @@
#include <linux/printk.h>
#include <linux/types.h>
#include <linux/units.h>
#include <asm/platform.h>
#include <asm/timex.h>
@ -38,7 +39,7 @@ void __weak platform_idle(void)
#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
void __weak platform_calibrate_ccount(void)
{
pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10MHz.\n");
ccount_freq = 10 * 1000000UL;
pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10 MHz.\n");
ccount_freq = 10 * HZ_PER_MHZ;
}
#endif

View File

@ -231,10 +231,14 @@ static ssize_t proc_read_simdisk(struct file *file, char __user *buf,
static ssize_t proc_write_simdisk(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
char *tmp = memdup_user_nul(buf, count);
char *tmp;
struct simdisk *dev = pde_data(file_inode(file));
int err;
if (count == 0 || count > PAGE_SIZE)
return -EINVAL;
tmp = memdup_user_nul(buf, count);
if (IS_ERR(tmp))
return PTR_ERR(tmp);