[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51010908.5090105@ti.com>
Date: Thu, 24 Jan 2013 11:12:24 +0100
From: Vincent Stehlé <v-stehle@...com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC: <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regmap: debugfs: Fix compilation warning
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 the loop iterates at least once", then yes, as
we have an explicit check just before the concerned list_for_each_entry():
/*
* This should never happen; we return above if we fail to
* allocate and we should never be in this code if there are
* no registers at all.
*/
if (list_empty(&map->debugfs_off_cache)) {
WARN_ON(list_empty(&map->debugfs_off_cache));
return base;
}
Best regards,
V.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists