qmempool: correct use of return values from alf_queue_alloc()

This were missing when converting qmempool from ring_queue to alf_queue.

The return value from alf_queue_alloc() is an ERR_PTR, test for this
instead of NULL test.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
qmempool: handle if sharedq only contained one element

With alf_queue the dequeue from pool->shared is no-longer a fixed
number of elements.  Need to handle if only a single element were
returned.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Kernel have an is_power_of_2() function avail in log2.h

Remove the open coded POWEROF2() and replace it with is_power_of_2()
avail in the kernel from include <linux/log2.h>.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>