Re: [PATCH] debug: fix BUILD_BUG_ON() for non-constant expressions
From: Rusty Russell
Date: Mon Aug 25 2008 - 00:00:45 EST
On Wednesday 20 August 2008 02:33:59 Boaz Harrosh wrote:
> If the user of virtio_has_feature() must pass a compile-time constant then
> it must be converted to a MACRO, and then the BUILD_BUG_ON will work.
> Or it should be changed to a BUG_ON() if fbit is a runtime variable.
I was (ab)using the current slackness of BUILD_BUG_ON() to be a noop on
non-constants. We can replace with a BUG_ON if we fix BUILD_BUG_ON() to
insist on a compile-time constant; I think that's still an overall win.
Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/