Quoting Matthew Auld (2019-08-09 21:29:24) > +int i915_buddy_alloc_range(struct i915_buddy_mm *mm, > + struct list_head *blocks, > + u64 start, u64 size) > +{ > + struct i915_buddy_block *block; > + struct i915_buddy_block *buddy; > + LIST_HEAD(allocated); > + LIST_HEAD(dfs); > + u64 end; > + int err; > + int i; > + > + if (size < mm->chunk_size) > + return -EINVAL; > + > + if (!IS_ALIGNED(start, mm->chunk_size)) > + return -EINVAL; > + > + if (!size || !IS_ALIGNED(size, mm->chunk_size)) > + return -EINVAL; chunk_size can't be 0 and size can't be less than chunk_size, ergo size is non-zero. if (!IS_ALIGNED(start | size, mm->chunk_size)) return -EINVAL; My last brain cell dies happy, -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx