diff options
Diffstat (limited to 'include/linux/mlx4/device.h')
-rw-r--r-- | include/linux/mlx4/device.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 631607788f83..4210ac4a8bcd 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -189,10 +189,8 @@ struct mlx4_buf_list { | |||
189 | }; | 189 | }; |
190 | 190 | ||
191 | struct mlx4_buf { | 191 | struct mlx4_buf { |
192 | struct { | 192 | struct mlx4_buf_list direct; |
193 | struct mlx4_buf_list direct; | 193 | struct mlx4_buf_list *page_list; |
194 | struct mlx4_buf_list *page_list; | ||
195 | } u; | ||
196 | int nbufs; | 194 | int nbufs; |
197 | int npages; | 195 | int npages; |
198 | int page_shift; | 196 | int page_shift; |
@@ -311,9 +309,9 @@ void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); | |||
311 | static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) | 309 | static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) |
312 | { | 310 | { |
313 | if (BITS_PER_LONG == 64 || buf->nbufs == 1) | 311 | if (BITS_PER_LONG == 64 || buf->nbufs == 1) |
314 | return buf->u.direct.buf + offset; | 312 | return buf->direct.buf + offset; |
315 | else | 313 | else |
316 | return buf->u.page_list[offset >> PAGE_SHIFT].buf + | 314 | return buf->page_list[offset >> PAGE_SHIFT].buf + |
317 | (offset & (PAGE_SIZE - 1)); | 315 | (offset & (PAGE_SIZE - 1)); |
318 | } | 316 | } |
319 | 317 | ||