svn commit: r311061 - stable/10/sys/dev/sfxge/common
Andrew Rybchenko
arybchik at FreeBSD.org
Mon Jan 2 09:10:39 UTC 2017
Author: arybchik
Date: Mon Jan 2 09:10:37 2017
New Revision: 311061
URL: https://svnweb.freebsd.org/changeset/base/311061
Log:
MFC r310692
sfxge(4): enclose macro complex value in parenthesis
Found by DPDK checkpatches.sh
Sponsored by: Solarflare Communications, Inc.
Modified:
stable/10/sys/dev/sfxge/common/efx_bootcfg.c
stable/10/sys/dev/sfxge/common/efx_types.h
stable/10/sys/dev/sfxge/common/mcdi_mon.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/sfxge/common/efx_bootcfg.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_bootcfg.c Mon Jan 2 09:09:46 2017 (r311060)
+++ stable/10/sys/dev/sfxge/common/efx_bootcfg.c Mon Jan 2 09:10:37 2017 (r311061)
@@ -43,8 +43,8 @@ __FBSDID("$FreeBSD$");
*/
#define BOOTCFG_MAX_SIZE 0x1000
-#define DHCP_END (uint8_t)0xff
-#define DHCP_PAD (uint8_t)0
+#define DHCP_END ((uint8_t)0xff)
+#define DHCP_PAD ((uint8_t)0)
static __checkReturn uint8_t
efx_bootcfg_csum(
Modified: stable/10/sys/dev/sfxge/common/efx_types.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_types.h Mon Jan 2 09:09:46 2017 (r311060)
+++ stable/10/sys/dev/sfxge/common/efx_types.h Mon Jan 2 09:10:37 2017 (r311061)
@@ -264,37 +264,37 @@ typedef union efx_oword_u {
#if EFSYS_IS_BIG_ENDIAN
-#define __CPU_TO_LE_16(_x) (uint16_t)__SWAP16(_x)
-#define __LE_TO_CPU_16(_x) (uint16_t)__SWAP16(_x)
-#define __CPU_TO_BE_16(_x) (uint16_t)__NOSWAP16(_x)
-#define __BE_TO_CPU_16(_x) (uint16_t)__NOSWAP16(_x)
-
-#define __CPU_TO_LE_32(_x) (uint32_t)__SWAP32(_x)
-#define __LE_TO_CPU_32(_x) (uint32_t)__SWAP32(_x)
-#define __CPU_TO_BE_32(_x) (uint32_t)__NOSWAP32(_x)
-#define __BE_TO_CPU_32(_x) (uint32_t)__NOSWAP32(_x)
-
-#define __CPU_TO_LE_64(_x) (uint64_t)__SWAP64(_x)
-#define __LE_TO_CPU_64(_x) (uint64_t)__SWAP64(_x)
-#define __CPU_TO_BE_64(_x) (uint64_t)__NOSWAP64(_x)
-#define __BE_TO_CPU_64(_x) (uint64_t)__NOSWAP64(_x)
+#define __CPU_TO_LE_16(_x) ((uint16_t)__SWAP16(_x))
+#define __LE_TO_CPU_16(_x) ((uint16_t)__SWAP16(_x))
+#define __CPU_TO_BE_16(_x) ((uint16_t)__NOSWAP16(_x))
+#define __BE_TO_CPU_16(_x) ((uint16_t)__NOSWAP16(_x))
+
+#define __CPU_TO_LE_32(_x) ((uint32_t)__SWAP32(_x))
+#define __LE_TO_CPU_32(_x) ((uint32_t)__SWAP32(_x))
+#define __CPU_TO_BE_32(_x) ((uint32_t)__NOSWAP32(_x))
+#define __BE_TO_CPU_32(_x) ((uint32_t)__NOSWAP32(_x))
+
+#define __CPU_TO_LE_64(_x) ((uint64_t)__SWAP64(_x))
+#define __LE_TO_CPU_64(_x) ((uint64_t)__SWAP64(_x))
+#define __CPU_TO_BE_64(_x) ((uint64_t)__NOSWAP64(_x))
+#define __BE_TO_CPU_64(_x) ((uint64_t)__NOSWAP64(_x))
#elif EFSYS_IS_LITTLE_ENDIAN
-#define __CPU_TO_LE_16(_x) (uint16_t)__NOSWAP16(_x)
-#define __LE_TO_CPU_16(_x) (uint16_t)__NOSWAP16(_x)
-#define __CPU_TO_BE_16(_x) (uint16_t)__SWAP16(_x)
-#define __BE_TO_CPU_16(_x) (uint16_t)__SWAP16(_x)
-
-#define __CPU_TO_LE_32(_x) (uint32_t)__NOSWAP32(_x)
-#define __LE_TO_CPU_32(_x) (uint32_t)__NOSWAP32(_x)
-#define __CPU_TO_BE_32(_x) (uint32_t)__SWAP32(_x)
-#define __BE_TO_CPU_32(_x) (uint32_t)__SWAP32(_x)
-
-#define __CPU_TO_LE_64(_x) (uint64_t)__NOSWAP64(_x)
-#define __LE_TO_CPU_64(_x) (uint64_t)__NOSWAP64(_x)
-#define __CPU_TO_BE_64(_x) (uint64_t)__SWAP64(_x)
-#define __BE_TO_CPU_64(_x) (uint64_t)__SWAP64(_x)
+#define __CPU_TO_LE_16(_x) ((uint16_t)__NOSWAP16(_x))
+#define __LE_TO_CPU_16(_x) ((uint16_t)__NOSWAP16(_x))
+#define __CPU_TO_BE_16(_x) ((uint16_t)__SWAP16(_x))
+#define __BE_TO_CPU_16(_x) ((uint16_t)__SWAP16(_x))
+
+#define __CPU_TO_LE_32(_x) ((uint32_t)__NOSWAP32(_x))
+#define __LE_TO_CPU_32(_x) ((uint32_t)__NOSWAP32(_x))
+#define __CPU_TO_BE_32(_x) ((uint32_t)__SWAP32(_x))
+#define __BE_TO_CPU_32(_x) ((uint32_t)__SWAP32(_x))
+
+#define __CPU_TO_LE_64(_x) ((uint64_t)__NOSWAP64(_x))
+#define __LE_TO_CPU_64(_x) ((uint64_t)__NOSWAP64(_x))
+#define __CPU_TO_BE_64(_x) ((uint64_t)__SWAP64(_x))
+#define __BE_TO_CPU_64(_x) ((uint64_t)__SWAP64(_x))
#else
Modified: stable/10/sys/dev/sfxge/common/mcdi_mon.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/mcdi_mon.c Mon Jan 2 09:09:46 2017 (r311060)
+++ stable/10/sys/dev/sfxge/common/mcdi_mon.c Mon Jan 2 09:10:37 2017 (r311061)
@@ -38,8 +38,8 @@ __FBSDID("$FreeBSD$");
#if EFSYS_OPT_MON_STATS
-#define MCDI_MON_NEXT_PAGE (uint16_t)0xfffe
-#define MCDI_MON_INVALID_SENSOR (uint16_t)0xfffd
+#define MCDI_MON_NEXT_PAGE ((uint16_t)0xfffe)
+#define MCDI_MON_INVALID_SENSOR ((uint16_t)0xfffd)
#define MCDI_MON_PAGE_SIZE 0x20
/* Bitmasks of valid port(s) for each sensor */
More information about the svn-src-stable
mailing list