diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/coldfire/gpio.c | 8 | ||||
-rw-r--r-- | arch/m68k/kernel/setup_no.c | 3 | ||||
-rw-r--r-- | arch/m68k/kernel/uboot.c | 2 | ||||
-rw-r--r-- | arch/m68k/mm/motorola.c | 3 |
4 files changed, 9 insertions, 7 deletions
diff --git a/arch/m68k/coldfire/gpio.c b/arch/m68k/coldfire/gpio.c index ca26de257871..30e5a4ed799d 100644 --- a/arch/m68k/coldfire/gpio.c +++ b/arch/m68k/coldfire/gpio.c @@ -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, diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c index f9872098f5ca..f724875b15cc 100644 --- a/arch/m68k/kernel/setup_no.c +++ b/arch/m68k/kernel/setup_no.c @@ -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 diff --git a/arch/m68k/kernel/uboot.c b/arch/m68k/kernel/uboot.c index 5e52ea150d5c..fa7c279ead5d 100644 --- a/arch/m68k/kernel/uboot.c +++ b/arch/m68k/kernel/uboot.c @@ -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]; diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index 6ab3ef39ba7a..745bd575dcfa 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -105,7 +105,8 @@ static struct list_head ptable_list[3] = { #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page((void *)(page))->lru)) #define PD_PAGE(ptable) (list_entry(ptable, struct page, lru)) -#define PD_MARKBITS(dp) (*(unsigned int *)&PD_PAGE(dp)->index) +#define PD_PTDESC(ptable) (list_entry(ptable, struct ptdesc, pt_list)) +#define PD_MARKBITS(dp) (*(unsigned int *)&PD_PTDESC(dp)->pt_index) static const int ptable_shift[3] = { 7+2, /* PGD */ |