* [PATCH 1/2] ARM: Add printf annotation to early_print
@ 2014-10-14 8:59 Alexander Stein
2014-10-14 8:59 ` [PATCH 2/2] ARM64: " Alexander Stein
2014-12-08 8:06 ` [PATCH 1/2] ARM: " Alexander Stein
0 siblings, 2 replies; 4+ messages in thread
From: Alexander Stein @ 2014-10-14 8:59 UTC (permalink / raw)
To: linux-arm-kernel
This adds the printf format annotation to early_print to warn users about
incompatible formats and argument.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
arch/arm/include/asm/setup.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index e0adb9f..d4e06cc 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -22,7 +22,7 @@
static const struct tagtable __tagtable_##fn __tag = { tag, fn }
extern int arm_add_memory(u64 start, u64 size);
-extern void early_print(const char *str, ...);
+extern __printf(1, 2) void early_print(const char *str, ...);
extern void dump_machine_table(void);
#endif
--
2.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ARM64: Add printf annotation to early_print
2014-10-14 8:59 [PATCH 1/2] ARM: Add printf annotation to early_print Alexander Stein
@ 2014-10-14 8:59 ` Alexander Stein
2014-10-14 9:43 ` Catalin Marinas
2014-12-08 8:06 ` [PATCH 1/2] ARM: " Alexander Stein
1 sibling, 1 reply; 4+ messages in thread
From: Alexander Stein @ 2014-10-14 8:59 UTC (permalink / raw)
To: linux-arm-kernel
This adds the printf format annotation to early_print to warn users about
incompatible formats and argument.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
arch/arm64/kernel/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index edb146d..bbf633b 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -102,7 +102,7 @@ static struct resource mem_res[] = {
#define kernel_code mem_res[0]
#define kernel_data mem_res[1]
-void __init early_print(const char *str, ...)
+void __init __printf(1, 2) early_print(const char *str, ...)
{
char buf[256];
va_list ap;
--
2.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ARM64: Add printf annotation to early_print
2014-10-14 8:59 ` [PATCH 2/2] ARM64: " Alexander Stein
@ 2014-10-14 9:43 ` Catalin Marinas
0 siblings, 0 replies; 4+ messages in thread
From: Catalin Marinas @ 2014-10-14 9:43 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 14, 2014 at 09:59:29AM +0100, Alexander Stein wrote:
> This adds the printf format annotation to early_print to warn users about
> incompatible formats and argument.
>
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
> arch/arm64/kernel/setup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
> index edb146d..bbf633b 100644
> --- a/arch/arm64/kernel/setup.c
> +++ b/arch/arm64/kernel/setup.c
> @@ -102,7 +102,7 @@ static struct resource mem_res[] = {
> #define kernel_code mem_res[0]
> #define kernel_data mem_res[1]
>
> -void __init early_print(const char *str, ...)
> +void __init __printf(1, 2) early_print(const char *str, ...)
> {
> char buf[256];
> va_list ap;
I wonder if we need this function at all on arm64. Early on, we used
something similar to the 32-bit ARM printascii but with an early console
now, we go through the printk anyway so I think we can just remove this
function (it has a single caller anyway on arm64).
--
Catalin
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] ARM: Add printf annotation to early_print
2014-10-14 8:59 [PATCH 1/2] ARM: Add printf annotation to early_print Alexander Stein
2014-10-14 8:59 ` [PATCH 2/2] ARM64: " Alexander Stein
@ 2014-12-08 8:06 ` Alexander Stein
1 sibling, 0 replies; 4+ messages in thread
From: Alexander Stein @ 2014-12-08 8:06 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
Any feedback in this?
Best regards,
Alexander
On Tuesday 14 October 2014 10:59:28, Alexander Stein wrote:
> This adds the printf format annotation to early_print to warn users about
> incompatible formats and argument.
>
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
> arch/arm/include/asm/setup.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
> index e0adb9f..d4e06cc 100644
> --- a/arch/arm/include/asm/setup.h
> +++ b/arch/arm/include/asm/setup.h
> @@ -22,7 +22,7 @@
> static const struct tagtable __tagtable_##fn __tag = { tag, fn }
>
> extern int arm_add_memory(u64 start, u64 size);
> -extern void early_print(const char *str, ...);
> +extern __printf(1, 2) void early_print(const char *str, ...);
> extern void dump_machine_table(void);
>
> #endif
>
--
Dipl.-Inf. Alexander Stein
SYS TEC electronic GmbH
Am Windrad 2
08468 Heinsdorfergrund
Tel.: 03765 38600-1156
Fax: 03765 38600-4100
Email: alexander.stein at systec-electronic.com
Website: www.systec-electronic.com
Managing Director: Dipl.-Phys. Siegmar Schmidt
Commercial registry: Amtsgericht Chemnitz, HRB 28082
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-08 8:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-14 8:59 [PATCH 1/2] ARM: Add printf annotation to early_print Alexander Stein
2014-10-14 8:59 ` [PATCH 2/2] ARM64: " Alexander Stein
2014-10-14 9:43 ` Catalin Marinas
2014-12-08 8:06 ` [PATCH 1/2] ARM: " Alexander Stein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).