lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50FE64C8.8040407@ti.com>
Date:	Tue, 22 Jan 2013 11:07:04 +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/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.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ