Re: [PATCH] regmap: debugfs: Fix compilation warning

2013-01-26 Thread Mark Brown
On Thu, Jan 24, 2013 at 11:12:24AM +0100, Vincent Stehlé wrote: > If you mean "am I sure the loop iterates at least once", then yes, as > we have an explicit check just before the concerned list_for_each_entry(): So, I hadn't realised this was triggered by a new compiler version - Arnd just tried

Re: [PATCH] regmap: debugfs: Fix compilation warning

2013-01-24 Thread Vincent Stehlé
On 01/23/2013 04:58 PM, Mark Brown wrote: > On Tue, Jan 22, 2013 at 11:07:04AM +0100, Vincent Stehlé wrote: > >> Do you think there is a way to "mark" the list_for_each_entry() >> as iterating at least once? an __attribute__ maybe? > > No - but are you sure that's true? If you mean "am I sure th

Re: [PATCH] regmap: debugfs: Fix compilation warning

2013-01-23 Thread Mark Brown
On Tue, Jan 22, 2013 at 11:07:04AM +0100, Vincent Stehlé wrote: > Do you think there is a way to "mark" the list_for_each_entry() as > iterating at least once? an __attribute__ maybe? No - but are you sure that's true? signature.asc Description: Digital signature

Re: [PATCH] regmap: debugfs: Fix compilation warning

2013-01-22 Thread Vincent Stehlé
On 01/22/2013 07:41 AM, Mark Brown wrote: (..) > This sort of fix is not a good idea, you're just shutting the > warning up without any sort of analysis explaining why it's > generated in error. If it's generating a spurious error that's a > compiler bug. In the regmap_debugfs_get_dump_start() fu

Re: [PATCH] regmap: debugfs: Fix compilation warning

2013-01-21 Thread Mark Brown
On Mon, Jan 21, 2013 at 03:36:55PM +0100, Vincent Stehlé wrote: > This fixes the following compilation warning: > - unsigned int i, ret; > + unsigned int i, ret = 0; This sort of fix is not a good idea, you're just shutting the warning up without any sort of analysis explaining why it's g