{
unsigned nr_entries = 0, ent_sz;
- if (!IS_ALIGNED(bytes, PAGE_SIZE)) {
+ if (!PAGE_ALIGNED(bytes)) {
pr_err("%s: wrong size %08x\n", __func__, bytes);
return 0;
}
if (!bytes)
return ERR_PTR(-EINVAL);
- if (!IS_ALIGNED(bytes, PAGE_SIZE))
+ if (!PAGE_ALIGNED(bytes))
return ERR_PTR(-EINVAL);
if (flags & IOVMF_LINEAR) {
size_t unmapped;
BUG_ON(!sgtable_ok(sgt));
- BUG_ON((!total) || !IS_ALIGNED(total, PAGE_SIZE));
+ BUG_ON((!total) || !PAGE_ALIGNED(total));
start = area->da_start;
for_each_sg(sgt->sgl, sg, sgt->nents, i) {
dev_dbg(obj->dev, "%s: unmap %08x(%x) %08x\n",
__func__, start, bytes, area->flags);
- BUG_ON(!IS_ALIGNED(bytes, PAGE_SIZE));
+ BUG_ON(!PAGE_ALIGNED(bytes));
total -= bytes;
start += bytes;
struct sg_table *sgt = NULL;
struct iovm_struct *area;
- if (!IS_ALIGNED(da, PAGE_SIZE)) {
+ if (!PAGE_ALIGNED(da)) {
dev_err(obj->dev, "%s: alignment err(%08x)\n", __func__, da);
return NULL;
}