Skip to content

Commit 0f2acd3

Browse files
committed
Merge tag 'm68knommu-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu updates from Greg Ungerer: - defconfig cleanup - fix for legacy 68000 CPU memmove() of non-aligned pointers - replace strcpy() with strscpy() for ucsimm target * tag 'm68knommu-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: Replace deprecated strcpy with strscpy in init_ucsimm m68k: nommu: fix memmove() with differently aligned src and dest for 68000 m68k: defconfig: Clean up references to non-existing configs
2 parents 26a4cfa + a16ac6c commit 0f2acd3

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

arch/m68k/68000/ucsimm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* for more details.
1010
*/
1111
#include <linux/init.h>
12+
#include <linux/string.h>
1213
#include <asm/bootstd.h>
1314
#include <asm/machdep.h>
1415
#include <asm/MC68VZ328.h>
@@ -31,7 +32,7 @@ void __init init_ucsimm(char *command, int size)
3132
pr_info("uCsimm/uCdimm hwaddr %pM\n", p);
3233
p = getbenv("APPEND");
3334
if (p)
34-
strcpy(p, command);
35+
strscpy(p, command, size);
3536
else
3637
command[0] = 0;
3738
}

arch/m68k/configs/amcore_defconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ CONFIG_SERIAL_MCF_BAUDRATE=115200
6161
CONFIG_SERIAL_MCF_CONSOLE=y
6262
# CONFIG_HW_RANDOM is not set
6363
CONFIG_I2C=y
64-
# CONFIG_I2C_COMPAT is not set
6564
CONFIG_I2C_CHARDEV=y
6665
# CONFIG_I2C_HELPER_AUTO is not set
6766
CONFIG_I2C_IMX=y
@@ -83,7 +82,6 @@ CONFIG_ROMFS_BACKED_BY_BOTH=y
8382
CONFIG_PRINTK_TIME=y
8483
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
8584
CONFIG_PANIC_ON_OOPS=y
86-
# CONFIG_SCHED_DEBUG is not set
8785
# CONFIG_DEBUG_BUGVERBOSE is not set
8886
# CONFIG_CRYPTO_ECHAINIV is not set
8987
# CONFIG_CRYPTO_HW is not set

arch/m68k/configs/m5475evb_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,5 @@ CONFIG_EXT2_FS=y
4646
# CONFIG_PROC_PAGE_MONITOR is not set
4747
CONFIG_ROMFS_FS=y
4848
CONFIG_ROMFS_BACKED_BY_MTD=y
49-
# CONFIG_SCHED_DEBUG is not set
5049
CONFIG_BOOTPARAM=y
5150
CONFIG_BOOTPARAM_STRING="root=/dev/mtdblock0"

arch/m68k/configs/stmark2_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,3 @@ CONFIG_PRINTK_TIME=y
9090
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
9191
CONFIG_SLUB_DEBUG_ON=y
9292
CONFIG_PANIC_ON_OOPS=y
93-
# CONFIG_SCHED_DEBUG is not set

arch/m68k/lib/memmove.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ void *memmove(void *dest, const void *src, size_t n)
2424
src = csrc;
2525
n--;
2626
}
27+
#if defined(CONFIG_M68000)
28+
if ((long)src & 1) {
29+
char *cdest = dest;
30+
const char *csrc = src;
31+
for (; n; n--)
32+
*cdest++ = *csrc++;
33+
return xdest;
34+
}
35+
#endif
2736
if (n > 2 && (long)dest & 2) {
2837
short *sdest = dest;
2938
const short *ssrc = src;
@@ -66,6 +75,15 @@ void *memmove(void *dest, const void *src, size_t n)
6675
src = csrc;
6776
n--;
6877
}
78+
#if defined(CONFIG_M68000)
79+
if ((long)src & 1) {
80+
char *cdest = dest;
81+
const char *csrc = src;
82+
for (; n; n--)
83+
*--cdest = *--csrc;
84+
return xdest;
85+
}
86+
#endif
6987
if (n > 2 && (long)dest & 2) {
7088
short *sdest = dest;
7189
const short *ssrc = src;

0 commit comments

Comments
 (0)