* [PATCH] arm64: remove redundant 'extern'
@ 2024-03-27 11:24 Steven Price
2024-04-02 10:01 ` Mark Rutland
0 siblings, 1 reply; 3+ messages in thread
From: Steven Price @ 2024-03-27 11:24 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon; +Cc: Steven Price, linux-arm-kernel, linux-kernel
It isn't necessary to mark function definitions extern and goes against
the kernel coding style. Remove the redundant extern keyword.
Signed-off-by: Steven Price <steven.price@arm.com>
---
arch/arm64/include/asm/fixmap.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
index 87e307804b99..75b22b89db1a 100644
--- a/arch/arm64/include/asm/fixmap.h
+++ b/arch/arm64/include/asm/fixmap.h
@@ -107,7 +107,7 @@ void __init early_fixmap_init(void);
#define __late_set_fixmap __set_fixmap
#define __late_clear_fixmap(idx) __set_fixmap((idx), 0, FIXMAP_PAGE_CLEAR)
-extern void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
+void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
#include <asm-generic/fixmap.h>
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: remove redundant 'extern'
2024-03-27 11:24 [PATCH] arm64: remove redundant 'extern' Steven Price
@ 2024-04-02 10:01 ` Mark Rutland
2024-04-03 9:58 ` Steven Price
0 siblings, 1 reply; 3+ messages in thread
From: Mark Rutland @ 2024-04-02 10:01 UTC (permalink / raw)
To: Steven Price; +Cc: Catalin Marinas, Will Deacon, linux-arm-kernel, linux-kernel
On Wed, Mar 27, 2024 at 11:24:39AM +0000, Steven Price wrote:
> It isn't necessary to mark function definitions extern and goes against
> the kernel coding style. Remove the redundant extern keyword.
>
> Signed-off-by: Steven Price <steven.price@arm.com>
We (unfortunately) have extern misused in a number of places:
| [mark@lakrids:~/src/linux]% git grep 'extern.*(' -- arch/arm64/include | cut -d: -f 1 | uniq -c
| 11 arch/arm64/include/asm/cacheflush.h
| 1 arch/arm64/include/asm/checksum.h
| 1 arch/arm64/include/asm/cpu_ops.h
| 4 arch/arm64/include/asm/cpufeature.h
| 2 arch/arm64/include/asm/efi.h
| 2 arch/arm64/include/asm/elf.h
| 1 arch/arm64/include/asm/exec.h
| 1 arch/arm64/include/asm/fixmap.h
| 48 arch/arm64/include/asm/fpsimd.h
| 3 arch/arm64/include/asm/ftrace.h
| 10 arch/arm64/include/asm/hugetlb.h
| 11 arch/arm64/include/asm/hw_breakpoint.h
| 6 arch/arm64/include/asm/io.h
| 4 arch/arm64/include/asm/kexec.h
| 1 arch/arm64/include/asm/kgdb.h
| 16 arch/arm64/include/asm/kvm_asm.h
| 3 arch/arm64/include/asm/kvm_host.h
| 11 arch/arm64/include/asm/kvm_hyp.h
| 2 arch/arm64/include/asm/kvm_pkvm.h
| 2 arch/arm64/include/asm/memory.h
| 8 arch/arm64/include/asm/mmu.h
| 2 arch/arm64/include/asm/page.h
| 1 arch/arm64/include/asm/percpu.h
| 2 arch/arm64/include/asm/perf_event.h
| 2 arch/arm64/include/asm/pgalloc.h
| 18 arch/arm64/include/asm/pgtable.h
| 3 arch/arm64/include/asm/pointer_auth.h
| 3 arch/arm64/include/asm/proc-fns.h
| 2 arch/arm64/include/asm/processor.h
| 3 arch/arm64/include/asm/ptrace.h
| 12 arch/arm64/include/asm/smp.h
| 1 arch/arm64/include/asm/stacktrace.h
| 14 arch/arm64/include/asm/string.h
| 2 arch/arm64/include/asm/suspend.h
| 1 arch/arm64/include/asm/system_misc.h
| 6 arch/arm64/include/asm/uaccess.h
... so it'd probably be best to make the commit title more specific to this
instance, and maybe go clean those up in bulk as a series to avoid a steady
stream of copycat patches.
Mark.
> ---
> arch/arm64/include/asm/fixmap.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
> index 87e307804b99..75b22b89db1a 100644
> --- a/arch/arm64/include/asm/fixmap.h
> +++ b/arch/arm64/include/asm/fixmap.h
> @@ -107,7 +107,7 @@ void __init early_fixmap_init(void);
> #define __late_set_fixmap __set_fixmap
> #define __late_clear_fixmap(idx) __set_fixmap((idx), 0, FIXMAP_PAGE_CLEAR)
>
> -extern void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
> +void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
>
> #include <asm-generic/fixmap.h>
>
> --
> 2.34.1
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] arm64: remove redundant 'extern'
2024-04-02 10:01 ` Mark Rutland
@ 2024-04-03 9:58 ` Steven Price
0 siblings, 0 replies; 3+ messages in thread
From: Steven Price @ 2024-04-03 9:58 UTC (permalink / raw)
To: Mark Rutland; +Cc: Catalin Marinas, Will Deacon, linux-arm-kernel, linux-kernel
On 02/04/2024 11:01, Mark Rutland wrote:
> On Wed, Mar 27, 2024 at 11:24:39AM +0000, Steven Price wrote:
>> It isn't necessary to mark function definitions extern and goes against
>> the kernel coding style. Remove the redundant extern keyword.
>>
>> Signed-off-by: Steven Price <steven.price@arm.com>
>
> We (unfortunately) have extern misused in a number of places:
>
> | [mark@lakrids:~/src/linux]% git grep 'extern.*(' -- arch/arm64/include | cut -d: -f 1 | uniq -c
> | 11 arch/arm64/include/asm/cacheflush.h
> | 1 arch/arm64/include/asm/checksum.h
> | 1 arch/arm64/include/asm/cpu_ops.h
> | 4 arch/arm64/include/asm/cpufeature.h
> | 2 arch/arm64/include/asm/efi.h
> | 2 arch/arm64/include/asm/elf.h
> | 1 arch/arm64/include/asm/exec.h
> | 1 arch/arm64/include/asm/fixmap.h
> | 48 arch/arm64/include/asm/fpsimd.h
> | 3 arch/arm64/include/asm/ftrace.h
> | 10 arch/arm64/include/asm/hugetlb.h
> | 11 arch/arm64/include/asm/hw_breakpoint.h
> | 6 arch/arm64/include/asm/io.h
> | 4 arch/arm64/include/asm/kexec.h
> | 1 arch/arm64/include/asm/kgdb.h
> | 16 arch/arm64/include/asm/kvm_asm.h
> | 3 arch/arm64/include/asm/kvm_host.h
> | 11 arch/arm64/include/asm/kvm_hyp.h
> | 2 arch/arm64/include/asm/kvm_pkvm.h
> | 2 arch/arm64/include/asm/memory.h
> | 8 arch/arm64/include/asm/mmu.h
> | 2 arch/arm64/include/asm/page.h
> | 1 arch/arm64/include/asm/percpu.h
> | 2 arch/arm64/include/asm/perf_event.h
> | 2 arch/arm64/include/asm/pgalloc.h
> | 18 arch/arm64/include/asm/pgtable.h
> | 3 arch/arm64/include/asm/pointer_auth.h
> | 3 arch/arm64/include/asm/proc-fns.h
> | 2 arch/arm64/include/asm/processor.h
> | 3 arch/arm64/include/asm/ptrace.h
> | 12 arch/arm64/include/asm/smp.h
> | 1 arch/arm64/include/asm/stacktrace.h
> | 14 arch/arm64/include/asm/string.h
> | 2 arch/arm64/include/asm/suspend.h
> | 1 arch/arm64/include/asm/system_misc.h
> | 6 arch/arm64/include/asm/uaccess.h
>
> ... so it'd probably be best to make the commit title more specific to this
> instance, and maybe go clean those up in bulk as a series to avoid a steady
> stream of copycat patches.
Ah, I hadn't gone looking that closely - I'll do a series updating the
arch/arm64/include ones (thanks for the list ;) ), and I'll include an
updated version of this patch, with a clearly commit title, in the series.
Thanks,
Steve
> Mark.
>
>> ---
>> arch/arm64/include/asm/fixmap.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
>> index 87e307804b99..75b22b89db1a 100644
>> --- a/arch/arm64/include/asm/fixmap.h
>> +++ b/arch/arm64/include/asm/fixmap.h
>> @@ -107,7 +107,7 @@ void __init early_fixmap_init(void);
>> #define __late_set_fixmap __set_fixmap
>> #define __late_clear_fixmap(idx) __set_fixmap((idx), 0, FIXMAP_PAGE_CLEAR)
>>
>> -extern void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
>> +void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
>>
>> #include <asm-generic/fixmap.h>
>>
>> --
>> 2.34.1
>>
>>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-03 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-27 11:24 [PATCH] arm64: remove redundant 'extern' Steven Price
2024-04-02 10:01 ` Mark Rutland
2024-04-03 9:58 ` Steven Price
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox