From owner-svn-src-all@freebsd.org Sat Dec 31 11:11:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6525AC992CE; Sat, 31 Dec 2016 11:11:06 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 279901640; Sat, 31 Dec 2016 11:11:06 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBVBB5eu041719; Sat, 31 Dec 2016 11:11:05 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBVBB5G9041716; Sat, 31 Dec 2016 11:11:05 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201612311111.uBVBB5G9041716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 31 Dec 2016 11:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310929 - stable/11/sys/dev/sfxge/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2016 11:11:06 -0000 Author: arybchik Date: Sat Dec 31 11:11:04 2016 New Revision: 310929 URL: https://svnweb.freebsd.org/changeset/base/310929 Log: MFC r310692 sfxge(4): enclose macro complex value in parenthesis Found by DPDK checkpatches.sh Sponsored by: Solarflare Communications, Inc. Modified: stable/11/sys/dev/sfxge/common/efx_bootcfg.c stable/11/sys/dev/sfxge/common/efx_types.h stable/11/sys/dev/sfxge/common/mcdi_mon.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sfxge/common/efx_bootcfg.c ============================================================================== --- stable/11/sys/dev/sfxge/common/efx_bootcfg.c Sat Dec 31 11:10:01 2016 (r310928) +++ stable/11/sys/dev/sfxge/common/efx_bootcfg.c Sat Dec 31 11:11:04 2016 (r310929) @@ -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/11/sys/dev/sfxge/common/efx_types.h ============================================================================== --- stable/11/sys/dev/sfxge/common/efx_types.h Sat Dec 31 11:10:01 2016 (r310928) +++ stable/11/sys/dev/sfxge/common/efx_types.h Sat Dec 31 11:11:04 2016 (r310929) @@ -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/11/sys/dev/sfxge/common/mcdi_mon.c ============================================================================== --- stable/11/sys/dev/sfxge/common/mcdi_mon.c Sat Dec 31 11:10:01 2016 (r310928) +++ stable/11/sys/dev/sfxge/common/mcdi_mon.c Sat Dec 31 11:11:04 2016 (r310929) @@ -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 */