Date: Wed, 18 Oct 2017 19:28:28 +0000 (UTC) From: Ryan Libby <rlibby@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324728 - in head/sys/dev: qlnx/qlnxe qlxgb qlxgbe qlxge Message-ID: <201710181928.v9IJSSfp005311@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710181928.v9IJSSfp005311>