diff options
author | Mark Johnston <markj@FreeBSD.org> | 2021-02-11 15:16:59 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2021-02-11 15:16:59 +0000 |
commit | 29ed53850e72ab1b470b978d150561281addc0fc (patch) | |
tree | 1e235c97c7e98d7c4b03694ae133a348e9864e5a /sys/dev/mthca/mthca_memfree.h | |
parent | c03ccb991d0e399435c9bbdb6b266ecee93f5b46 (diff) | |
download | src-29ed53850e72ab1b470b978d150561281addc0fc.tar.gz src-29ed53850e72ab1b470b978d150561281addc0fc.zip |
mlx4, mthca: Silence warnings about no-op alignment operations
Since commit 8fa6abb6f4f64f ("Expose clang's alignment builtins and use
them for roundup2/rounddown2"), clang emits warnings for several
alignment operations in these drivers because the operation is a no-op.
The compiler is arguably being too strict here, but in the meantime
let's silence the warnings by conditionally compiling the alignment
operations.
Reviewed by: arichardson, hselasky
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D28576
Diffstat (limited to 'sys/dev/mthca/mthca_memfree.h')
-rw-r--r-- | sys/dev/mthca/mthca_memfree.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/mthca/mthca_memfree.h b/sys/dev/mthca/mthca_memfree.h index da9b8f9b884f..9aa10a6a47e1 100644 --- a/sys/dev/mthca/mthca_memfree.h +++ b/sys/dev/mthca/mthca_memfree.h @@ -42,11 +42,9 @@ ((256 - sizeof (struct list_head) - 2 * sizeof (int)) / \ (sizeof (struct scatterlist))) -enum { - MTHCA_ICM_PAGE_SHIFT = 12, - MTHCA_ICM_PAGE_SIZE = 1 << MTHCA_ICM_PAGE_SHIFT, - MTHCA_DB_REC_PER_PAGE = MTHCA_ICM_PAGE_SIZE / 8 -}; +#define MTHCA_ICM_PAGE_SHIFT 12 +#define MTHCA_ICM_PAGE_SIZE (1 << MTHCA_ICM_PAGE_SHIFT) +#define MTHCA_DB_REC_PER_PAGE (MTHCA_ICM_PAGE_SIZE / 8) struct mthca_icm_chunk { struct list_head list; |