Commit df7b9b4f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents d00a8347 eb43efd0
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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,
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,
+1 −2
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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];