* [PATCH] arm: removed compiler warning
@ 2014-02-17 4:38 John de la Garza
2014-02-21 8:40 ` Gregory CLEMENT
0 siblings, 1 reply; 2+ messages in thread
From: John de la Garza @ 2014-02-17 4:38 UTC (permalink / raw)
To: linux-arm-kernel
Removed this compiler warning for arch/arm/boot/compressed/atags_to_fdt.c.
The warning was: 'memsize' may be used uninitialized in this function.
Signed-off-by: John de la Garza <john@jjdev.com>
---
arch/arm/boot/compressed/atags_to_fdt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c
index d1153c8..75b64da 100644
--- a/arch/arm/boot/compressed/atags_to_fdt.c
+++ b/arch/arm/boot/compressed/atags_to_fdt.c
@@ -110,7 +110,8 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
* address and size for each bank */
uint32_t mem_reg_property[2 * 2 * NR_BANKS];
int memcount = 0;
- int ret, memsize;
+ int memsize = 0;
+ int ret;
/* make sure we've got an aligned pointer */
if ((u32)atag_list & 0x3)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] arm: removed compiler warning
2014-02-17 4:38 [PATCH] arm: removed compiler warning John de la Garza
@ 2014-02-21 8:40 ` Gregory CLEMENT
0 siblings, 0 replies; 2+ messages in thread
From: Gregory CLEMENT @ 2014-02-21 8:40 UTC (permalink / raw)
To: linux-arm-kernel
On 17/02/2014 05:38, John de la Garza wrote:
> Removed this compiler warning for arch/arm/boot/compressed/atags_to_fdt.c.
> The warning was: 'memsize' may be used uninitialized in this function.
>
Indeed it was an error, thanks to have fixed it.
> Signed-off-by: John de la Garza <john@jjdev.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
> arch/arm/boot/compressed/atags_to_fdt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c
> index d1153c8..75b64da 100644
> --- a/arch/arm/boot/compressed/atags_to_fdt.c
> +++ b/arch/arm/boot/compressed/atags_to_fdt.c
> @@ -110,7 +110,8 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
> * address and size for each bank */
> uint32_t mem_reg_property[2 * 2 * NR_BANKS];
> int memcount = 0;
> - int ret, memsize;
> + int memsize = 0;
> + int ret;
>
> /* make sure we've got an aligned pointer */
> if ((u32)atag_list & 0x3)
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-21 8:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17 4:38 [PATCH] arm: removed compiler warning John de la Garza
2014-02-21 8:40 ` Gregory CLEMENT
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).