Thread (8 messages) flat view 8 messages, 3 authors, 2021-04-09

Re: [PATCH 2/2] powerpc: make 'boot_text_mapped' static

From: Segher Boessenkool <hidden>
Date: 2021-04-09 12:05:50
Also in: lkml

Hi!

On Thu, Apr 08, 2021 at 07:04:35AM +0200, Christophe Leroy wrote:
Le 08/04/2021 à 03:18, Yu Kuai a écrit :
quoted
-int boot_text_mapped __force_data = 0;
+static int boot_text_mapped __force_data;
Are you sure the initialisation to 0 can be removed ? Usually 
initialisation to 0 is not needed because not initialised variables go in 
the BSS section which is zeroed at startup. But here the variable is 
flagged with __force_data so it is not going in the BSS section.
Any non-automatic (i.e. function-scope, not static) variable is
initialised to 0.  See e.g. C11 6.7.9/10 (this has been like that since
times immemorial, C90 anyway).


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help