/* @bmp_itr: pointer to bitmap (can be declared with DECLARE_BITMAP) @buffer: pointer to buffer containing bitmap data in big endian format (MSB first) @buffer_size:number of bytes with which bitmap should be initialized  */
static void buffer_to_bmp(unsigned long *bmp_itr, void *_buffer, size_t buffer_size)
/* @bmp_itr: pointer to bitmap (can be declared with DECLARE_BITMAP) @buffer: pointer to buffer containing bitmap data in big endian format (MSB first) @buffer_size:number of bytes with which bitmap should be initialized  */
static void buffer_to_bmp(unsigned long *bmp_itr, void *_buffer, size_t buffer_size)
{
	u8 *buffer = _buffer;
	size_t itr, len;
	unsigned long val;
	itr = 0;
	while (itr < buffer_size) {
		len = buffer_size - itr >= sizeof(val) ?
			sizeof(val) : buffer_size - itr;
		val = get_val(buffer, itr, len);
		bmp_itr[itr / sizeof(val)] = val;
		itr += sizeof(val);
	}
}