aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/scatterlist.h
blob: 7f717e95ae37703b2c1eb7c0ba642cb45ee754ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef _LINUX_SCATTERLIST_H
#define _LINUX_SCATTERLIST_H

static inline void sg_init_one(struct scatterlist *sg,
			       u8 *buf, unsigned int buflen)
{
	memset(sg, 0, sizeof(*sg));

	sg->page = virt_to_page(buf);
	sg->offset = offset_in_page(buf);
	sg->length = buflen;
}

#endif /* _LINUX_SCATTERLIST_H */