Re: [PATCH] ASoC: cs35l32: avoid uninitialized variable access

2016-01-04 Thread Russell King - ARM Linux
On Mon, Jan 04, 2016 at 05:41:05PM +0100, Arnd Bergmann wrote: > That reminds of a different problem that has been bugging me for a > while: We frequently have a pattern like > > #ifdef CONFIG_FOO > static int function(void) > { > ... > } > #endif > > struct operations = { > ... > #if

Re: [PATCH] ASoC: cs35l32: avoid uninitialized variable access

2016-01-04 Thread Arnd Bergmann
On Monday 04 January 2016 15:20:58 Russell King - ARM Linux wrote: > On Mon, Jan 04, 2016 at 04:17:47PM +0100, Arnd Bergmann wrote: > > On Saturday 02 January 2016 14:17:46 Mark Brown wrote: > > > On Sat, Jan 02, 2016 at 12:19:52AM +0100, Arnd Bergmann wrote: > > > > > > > - if (i2c_cl

Re: [PATCH] ASoC: cs35l32: avoid uninitialized variable access

2016-01-04 Thread Mark Brown
On Mon, Jan 04, 2016 at 04:17:47PM +0100, Arnd Bergmann wrote: > On Saturday 02 January 2016 14:17:46 Mark Brown wrote: > > This would be a lot nicer if there was an __always_null annotation we > > could put on of_node for !OF configurations, that'd Just Work and this > > can't be the only case wh

Re: [PATCH] ASoC: cs35l32: avoid uninitialized variable access

2016-01-04 Thread Russell King - ARM Linux
On Mon, Jan 04, 2016 at 04:17:47PM +0100, Arnd Bergmann wrote: > On Saturday 02 January 2016 14:17:46 Mark Brown wrote: > > On Sat, Jan 02, 2016 at 12:19:52AM +0100, Arnd Bergmann wrote: > > > > > - if (i2c_client->dev.of_node) { > > > + if (IS_ENABLED(CONFIG_OF) && i2c_cli

Re: [PATCH] ASoC: cs35l32: avoid uninitialized variable access

2016-01-04 Thread Arnd Bergmann
On Saturday 02 January 2016 14:17:46 Mark Brown wrote: > On Sat, Jan 02, 2016 at 12:19:52AM +0100, Arnd Bergmann wrote: > > > - if (i2c_client->dev.of_node) { > > + if (IS_ENABLED(CONFIG_OF) && i2c_client->dev.of_node) { > > This would be a lot nicer if there was an __alwa