m68knommu: updates and fixes for v6.16

. use new gpio line value settings
 . use strscpy() more
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEmsfM6tQwfNjBOxr3TiQVqaG9L4AFAmg8z4gQHGdlcmdAa2Vy
 bmVsLm9yZwAKCRBOJBWpob0vgONVEACgRI4DtxohIRcXKWn4JDCjFpJM/CuSaeip
 9BValWy5PmxTTey1H26mQUfur6rLNrBV4JbcB1d+dVwOuXumy+r4fflpvgmbvnQn
 fnw7ikC6O/9b1GZukwLQ6vnmYm/8f20afgQONwgmm+mOwjzKyA05uv0FBASrdvmH
 TVO+zvX/TFbA4l0926Q4XNSrNGX0Ud8ZvT+p3ZXGF5foePPX8B36RufC4gu/tPLe
 ocgKUzMjuzyb9520FiahXYoK7AMe2oEKmzeeRZPK0wnOxG6j4sISTSLVHcj5zxw8
 oY1lQmdnofH1A2LSjP7a2HJkhoEkLdM/aPRwCuPLH/L9HwwGaierKO+6v6/d6O1R
 kQ4Thvtr2rleXXaXYyDirjYSSqljX8qFAiriT0Dqod+XhGvrfRgoPD4XSzwmhoxK
 qcyZ4AvRP0MPCfba2/QFIPCaSDufZDMPSPhs7A9iOg+1zThcqpZgrIU0wDWi1rMH
 vJ5bzFpA/Rs7JrSR4sfBph3WwjS/YtUg+fj3cGSDipC+6WTYUVB2HapNqwPa9Xet
 vNLHI0Z9HM74SFqi0ZCjZhUrDJpEl7d51WNIkKLIr2q6/OuoAAcEPVDejoGkNvns
 WMKc7DwHp21cyPjkcU2w7IcP+P+5+9je+jtFJzyzZMjgPpEUpI3BuS7wR7F4JA2J
 SeNRAQnJ0w==
 =NsaM
 -----END PGP SIGNATURE-----

Merge tag 'm68knommu-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu

Pull m68knommu updates from Greg Ungerer:

 - use new gpio line value settings

 - use strscpy() more

* tag 'm68knommu-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68k: Replace memcpy() + manual NUL-termination with strscpy()
  m68k/kernel: replace strncpy() with strscpy()
  m68k: coldfire: gpio: use new line value setter callbacks
This commit is contained in:
Linus Torvalds 2025-06-02 12:16:17 -07:00
commit df7b9b4f6b
3 changed files with 7 additions and 6 deletions

View File

@ -123,10 +123,12 @@ static int mcfgpio_direction_output(struct gpio_chip *chip, unsigned offset,
return __mcfgpio_direction_output(offset, value);
}
static void mcfgpio_set_value(struct gpio_chip *chip, unsigned offset,
int value)
static int mcfgpio_set_value(struct gpio_chip *chip, unsigned int offset,
int value)
{
__mcfgpio_set_value(offset, value);
return 0;
}
static int mcfgpio_request(struct gpio_chip *chip, unsigned offset)
@ -158,7 +160,7 @@ static struct gpio_chip mcfgpio_chip = {
.direction_input = mcfgpio_direction_input,
.direction_output = mcfgpio_direction_output,
.get = mcfgpio_get_value,
.set = mcfgpio_set_value,
.set_rv = mcfgpio_set_value,
.to_irq = mcfgpio_to_irq,
.base = 0,
.ngpio = MCFGPIO_PIN_MAX,

View File

@ -145,8 +145,7 @@ void __init setup_arch(char **cmdline_p)
/* Keep a copy of command line */
*cmdline_p = &command_line[0];
memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
boot_command_line[COMMAND_LINE_SIZE-1] = 0;
strscpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
/*
* Give all the memory to the bootmap allocator, tell it to put the

View File

@ -73,7 +73,7 @@ static void __init parse_uboot_commandline(char *commandp, int size)
uboot_cmd_end = sp[5];
if (uboot_cmd_start && uboot_cmd_end)
strncpy(commandp, (const char *)uboot_cmd_start, size);
strscpy(commandp, (const char *)uboot_cmd_start, size);
#if defined(CONFIG_BLK_DEV_INITRD)
uboot_initrd_start = sp[2];