From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerlando Falauto Date: Fri, 18 Nov 2011 08:25:05 +0100 Subject: [U-Boot] checkpatch compliance In-Reply-To: <20111117205404.9105F140874F@gemini.denx.de> References: <4EC56A2E.2000708@keymile.com> <20111117205404.9105F140874F@gemini.denx.de> Message-ID: <4EC60851.9040706@keymile.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/17/2011 09:54 PM, Wolfgang Denk wrote: > Dear Gerlando Falauto, > > In message<4EC56A2E.2000708@keymile.com> you wrote: >> >> What is wrong with something like: >> >> ERROR: do not initialise statics to 0 or NULL >> #35: FILE: serial.c:32: >> +static struct serial_device *serial_devices = NULL; > > Why? Why don't you just follow the advise and remove the redundant > initializers? Sorry, I didn't realize it had to do with redundancy, the message was somewhat unclear to me. I thought the complaint meant something like "you should initialize statics somewhere else", which, in fact, would not make any sense, in ANY context. I personally would prefer an explicit initialization though, like mama told me to ALWAYS do... wash your hands before you eat, brush your teeth after. (I also like to believe I'm not the only one who had never read ISO/IEC 9899 ?6.7.8#2). :-) Thanks, Gerlando Falauto