https://github.com/torvalds/linux
Revision 6882edc04f37691ff9c7fcb30b52506cd7697eb0 authored by Robin Holt on 08 December 2008, 14:43:46 UTC, committed by Tony Luck on 09 December 2008, 18:08:39 UTC
The generic_defconfig has three section mismatches.  This clears up
sn_check_wars().

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
1 parent 9877e7b
Raw File
Tip revision: 6882edc04f37691ff9c7fcb30b52506cd7697eb0 authored by Robin Holt on 08 December 2008, 14:43:46 UTC
[IA64] Clear up section mismatch for sn_check_wars.
Tip revision: 6882edc
int_sqrt.c

#include <linux/kernel.h>
#include <linux/module.h>

/**
 * int_sqrt - rough approximation to sqrt
 * @x: integer of which to calculate the sqrt
 *
 * A very rough approximation to the sqrt() function.
 */
unsigned long int_sqrt(unsigned long x)
{
	unsigned long op, res, one;

	op = x;
	res = 0;

	one = 1UL << (BITS_PER_LONG - 2);
	while (one > op)
		one >>= 2;

	while (one != 0) {
		if (op >= res + one) {
			op = op - (res + one);
			res = res +  2 * one;
		}
		res /= 2;
		one /= 4;
	}
	return res;
}
EXPORT_SYMBOL(int_sqrt);
back to top