lkml.org 
[lkml]   [2013]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regmap: debugfs: Fix compilation warning
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() function control flow, I think
the compiler cannot know for sure that the list_for_each_entry()
iterates at least once.:

regmap_debugfs_get_dump_start()
{
unsigned int ret;
<snip some code, which does not touch ret>

list_for_each_entry() {
<snip some code>
ret = <value>;
}

return ret;
}

Do you think there is a way to "mark" the list_for_each_entry() as
iterating at least once? an __attribute__ maybe?

Best regards,

V.



\
 
 \ /
  Last update: 2013-01-22 12:21    [W:0.076 / U:1.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site