Skip to contentSkip to conversation

ARM64: remove unnecessary architecture-specific <asm/device.h>

PATCH Applied Ethan Nelson-Moore 2 participants 5 messages May 17 – Jun 2 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM64: remove unnecessary architecture-specific <asm/device.h>

arch/arm64/include/asm/device.h is identical to include/asm-generic/device.h, and therefore the ARM64-specific version is unnecessary. Remove it.

---
 arch/arm64/include/asm/device.h | 14 --------------
 1 file changed, 14 deletions(-)
 delete mode 100644 arch/arm64/include/asm/device.h
arch/arm64/include/asm/device.h deleted +0 -14
deleted file mode 100644
index 996498751318..000000000000
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2012 ARM Ltd.
- */
-#ifndef __ASM_DEVICE_H
-#define __ASM_DEVICE_H
-
-struct dev_archdata {
-};
-
-struct pdev_archdata {
-};
-
-#endif
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 20 lines · Ethan Nelson-Moore

arch/arm64/include/asm/device.h is identical to include/asm-generic/device.h, and therefore the ARM64-specific version is unnecessary. Remove it.

---
 arch/arm64/include/asm/device.h | 14 --------------
 1 file changed, 14 deletions(-)
 delete mode 100644 arch/arm64/include/asm/device.h
arch/arm64/include/asm/device.h deleted +0 -4
deleted file mode 100644
index 996498751318..000000000000
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2012 ARM Ltd.
- */

arch/arm64/include/asm/device.h line 14

Quoted 10 lines
arch/arm64/include/asm/device.h deleted +0 -10
-#ifndef __ASM_DEVICE_H
-#define __ASM_DEVICE_H
-
-struct dev_archdata {
-};
-
-struct pdev_archdata {
-};
-
-#endif

Do we need to add a generic-y entry to arch/arm64/include/asm/Kbuild so that we pick up the asm-generic variant?

Will

#2 lore raw

Hi, Will,

Quoted 2 lines · Will Deacon

Do we need to add a generic-y entry to arch/arm64/include/asm/Kbuild so that we pick up the asm-generic variant?

No, we don't, because device.h is in the list of mandatory headers in include/asm-generic/Kbuild, which means a header including the generic version will automatically be generated if an architecture-specific version does not exist.

Ethan

maintainer
#3 lore raw
Quoted 8 lines · Ethan Nelson-Moore
Quoted 2 lines · Will Deacon

Do we need to add a generic-y entry to arch/arm64/include/asm/Kbuild so that we pick up the asm-generic variant?

No, we don't, because device.h is in the list of mandatory headers in include/asm-generic/Kbuild, which means a header including the generic version will automatically be generated if an architecture-specific version does not exist.

Great, thanks for the explanation. I'll pick this up.

Will

maintainer Applied
#4 lore raw
In reply to Ethan Nelson-Moore
Quoted 5 lines · Ethan Nelson-Moore

arch/arm64/include/asm/device.h is identical to include/asm-generic/device.h, and therefore the ARM64-specific version is unnecessary. Remove it.

Applied to arm64 (for-next/misc), thanks!

[1/1] ARM64: remove unnecessary architecture-specific <asm/device.h>

      https://git.kernel.org/arm64/c/32e4c96d6a71

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev