aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx4/device.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index a0afa7511a30..631607788f83 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -189,7 +189,7 @@ struct mlx4_buf_list {
189}; 189};
190 190
191struct mlx4_buf { 191struct mlx4_buf {
192 union { 192 struct {
193 struct mlx4_buf_list direct; 193 struct mlx4_buf_list direct;
194 struct mlx4_buf_list *page_list; 194 struct mlx4_buf_list *page_list;
195 } u; 195 } u;
@@ -310,7 +310,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
310void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); 310void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf);
311static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) 311static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset)
312{ 312{
313 if (buf->nbufs == 1) 313 if (BITS_PER_LONG == 64 || buf->nbufs == 1)
314 return buf->u.direct.buf + offset; 314 return buf->u.direct.buf + offset;
315 else 315 else
316 return buf->u.page_list[offset >> PAGE_SHIFT].buf + 316 return buf->u.page_list[offset >> PAGE_SHIFT].buf +