Author: rlibby Date: Wed Oct 18 19:28:28 2017 New Revision: 324728 URL: https://svnweb.freebsd.org/changeset/base/324728
Log: ql*_def.h: fix QL_ALIGN parenthesization QL_ALIGN is a set of copies of roundup2, but it was missing an outer set of parentheses, which began to matter with r324538. Now, fully copy the parenthesization of roundup2. Reviewed by: davidcs Differential Revision: https://reviews.freebsd.org/D12673 Modified: head/sys/dev/qlnx/qlnxe/qlnx_def.h head/sys/dev/qlxgb/qla_def.h head/sys/dev/qlxgbe/ql_def.h head/sys/dev/qlxge/qls_def.h Modified: head/sys/dev/qlnx/qlnxe/qlnx_def.h ============================================================================== --- head/sys/dev/qlnx/qlnxe/qlnx_def.h Wed Oct 18 19:22:53 2017 (r324727) +++ head/sys/dev/qlnx/qlnxe/qlnx_def.h Wed Oct 18 19:28:28 2017 (r324728) @@ -486,7 +486,7 @@ struct qlnx_host { typedef struct qlnx_host qlnx_host_t; /* note that align has to be a power of 2 */ -#define QL_ALIGN(size, align) (size + (align - 1)) & ~(align - 1); +#define QL_ALIGN(size, align) (((size) + ((align) - 1)) & (~((align) - 1))) #define QL_MIN(x, y) ((x < y) ? x : y) #define QL_RUNNING(ifp) \ Modified: head/sys/dev/qlxgb/qla_def.h ============================================================================== --- head/sys/dev/qlxgb/qla_def.h Wed Oct 18 19:22:53 2017 (r324727) +++ head/sys/dev/qlxgb/qla_def.h Wed Oct 18 19:28:28 2017 (r324728) @@ -200,7 +200,7 @@ struct qla_host { typedef struct qla_host qla_host_t; /* note that align has to be a power of 2 */ -#define QL_ALIGN(size, align) (size + (align - 1)) & ~(align - 1); +#define QL_ALIGN(size, align) (((size) + ((align) - 1)) & (~((align) - 1))) #define QL_MIN(x, y) ((x < y) ? x : y) #define QL_RUNNING(ifp) \ Modified: head/sys/dev/qlxgbe/ql_def.h ============================================================================== --- head/sys/dev/qlxgbe/ql_def.h Wed Oct 18 19:22:53 2017 (r324727) +++ head/sys/dev/qlxgbe/ql_def.h Wed Oct 18 19:28:28 2017 (r324728) @@ -263,7 +263,7 @@ struct qla_host { typedef struct qla_host qla_host_t; /* note that align has to be a power of 2 */ -#define QL_ALIGN(size, align) (size + (align - 1)) & ~(align - 1); +#define QL_ALIGN(size, align) (((size) + ((align) - 1)) & (~((align) - 1))) #define QL_MIN(x, y) ((x < y) ? x : y) #define QL_RUNNING(ifp) (ifp->if_drv_flags & IFF_DRV_RUNNING) Modified: head/sys/dev/qlxge/qls_def.h ============================================================================== --- head/sys/dev/qlxge/qls_def.h Wed Oct 18 19:22:53 2017 (r324727) +++ head/sys/dev/qlxge/qls_def.h Wed Oct 18 19:28:28 2017 (r324728) @@ -361,7 +361,7 @@ struct qla_host { typedef struct qla_host qla_host_t; /* note that align has to be a power of 2 */ -#define QL_ALIGN(size, align) (size + (align - 1)) & ~(align - 1); +#define QL_ALIGN(size, align) (((size) + ((align) - 1)) & (~((align) - 1))) #define QL_MIN(x, y) ((x < y) ? x : y) #define QL_RUNNING(ifp) \ _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"