diff mbox series

[4/8] m68k: use asm-generic/unaligned.h

Message ID 20230522122238.4191762-5-jens.wiklander@linaro.org (mailing list archive)
State New, archived
Headers show
Series Cleanup unaligned access macros | expand

Commit Message

Jens Wiklander May 22, 2023, 12:22 p.m. UTC
M68k essentially duplicates the content of asm-generic/unaligned.h, with
an exception for non-Coldfire configurations. Coldfire configurations
are apparently able to do unaligned accesses. But in an attempt to clean
up and handle unaligned accesses in the same way we ignore that and use
the common asm-generic/unaligned.h directly instead.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
---
 arch/m68k/include/asm/unaligned.h | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

Comments

Angelo Dureghello May 28, 2023, 6:54 p.m. UTC | #1
Hi,

On 22/05/23 2:22 PM, Jens Wiklander wrote:
> M68k essentially duplicates the content of asm-generic/unaligned.h, with
> an exception for non-Coldfire configurations. Coldfire configurations
> are apparently able to do unaligned accesses. But in an attempt to clean
> up and handle unaligned accesses in the same way we ignore that and use
> the common asm-generic/unaligned.h directly instead.
> 
> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> ---
>   arch/m68k/include/asm/unaligned.h | 17 ++---------------
>   1 file changed, 2 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/m68k/include/asm/unaligned.h b/arch/m68k/include/asm/unaligned.h
> index 328aa0c316c9..7fb482abc383 100644
> --- a/arch/m68k/include/asm/unaligned.h
> +++ b/arch/m68k/include/asm/unaligned.h
> @@ -1,15 +1,2 @@
> -#ifndef _ASM_M68K_UNALIGNED_H
> -#define _ASM_M68K_UNALIGNED_H
> -
> -#ifdef CONFIG_COLDFIRE
> -#include <linux/unaligned/be_byteshift.h>
> -#else
> -#include <linux/unaligned/access_ok.h>
> -#endif
> -
> -#include <linux/unaligned/generic.h>
> -
> -#define get_unaligned	__get_unaligned_be
> -#define put_unaligned	__put_unaligned_be
> -
> -#endif /* _ASM_M68K_UNALIGNED_H */
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#include <asm-generic/unaligned.h>

sorry if a bit late,
i tested this on coldfire mcf54415, no issues, so ok for me.


Acked-by: Angelo Dureghello <angelo@kernel-space.org>


Regards,
angelo
diff mbox series

Patch

diff --git a/arch/m68k/include/asm/unaligned.h b/arch/m68k/include/asm/unaligned.h
index 328aa0c316c9..7fb482abc383 100644
--- a/arch/m68k/include/asm/unaligned.h
+++ b/arch/m68k/include/asm/unaligned.h
@@ -1,15 +1,2 @@ 
-#ifndef _ASM_M68K_UNALIGNED_H
-#define _ASM_M68K_UNALIGNED_H
-
-#ifdef CONFIG_COLDFIRE
-#include <linux/unaligned/be_byteshift.h>
-#else
-#include <linux/unaligned/access_ok.h>
-#endif
-
-#include <linux/unaligned/generic.h>
-
-#define get_unaligned	__get_unaligned_be
-#define put_unaligned	__put_unaligned_be
-
-#endif /* _ASM_M68K_UNALIGNED_H */
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm-generic/unaligned.h>