From owner-svn-src-head@freebsd.org Tue Jun 12 06:46:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74A381001F7D; Tue, 12 Jun 2018 06:46:04 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 272337077C; Tue, 12 Jun 2018 06:46:04 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 081CE26DA0; Tue, 12 Jun 2018 06:46:04 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5C6k3G1089940; Tue, 12 Jun 2018 06:46:03 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5C6k3VB089938; Tue, 12 Jun 2018 06:46:03 GMT (envelope-from np@FreeBSD.org) Message-Id: <201806120646.w5C6k3VB089938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 12 Jun 2018 06:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334987 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 334987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2018 06:46:04 -0000 Author: np Date: Tue Jun 12 06:46:03 2018 New Revision: 334987 URL: https://svnweb.freebsd.org/changeset/base/334987 Log: cxgbe(4): Remove homemade version of htobe32 from the driver. It was needed only for ia64 where it was implemented as a call to bswapXX, which was always a real function. htobeXX with a constant argument is calculated at compile-time everywhere else. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/osdep.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/osdep.h ============================================================================== --- head/sys/dev/cxgbe/osdep.h Tue Jun 12 03:44:34 2018 (r334986) +++ head/sys/dev/cxgbe/osdep.h Tue Jun 12 06:46:03 2018 (r334987) @@ -67,11 +67,8 @@ typedef uint64_t __be64; #if BYTE_ORDER == BIG_ENDIAN #define __BIG_ENDIAN_BITFIELD -#define htobe32_const(x) (x) #elif BYTE_ORDER == LITTLE_ENDIAN #define __LITTLE_ENDIAN_BITFIELD -#define htobe32_const(x) (((x) >> 24) | (((x) >> 8) & 0xff00) | \ - ((((x) & 0xffffff) << 8) & 0xff0000) | ((((x) & 0xff) << 24) & 0xff000000)) #else #error "Must set BYTE_ORDER" #endif Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Jun 12 03:44:34 2018 (r334986) +++ head/sys/dev/cxgbe/t4_main.c Tue Jun 12 06:46:03 2018 (r334987) @@ -3213,7 +3213,7 @@ struct fw_info { .fw_mod_name = "t4fw", .fw_hdr = { .chip = FW_HDR_CHIP_T4, - .fw_ver = htobe32_const(FW_VERSION(T4)), + .fw_ver = htobe32(FW_VERSION(T4)), .intfver_nic = FW_INTFVER(T4, NIC), .intfver_vnic = FW_INTFVER(T4, VNIC), .intfver_ofld = FW_INTFVER(T4, OFLD), @@ -3229,7 +3229,7 @@ struct fw_info { .fw_mod_name = "t5fw", .fw_hdr = { .chip = FW_HDR_CHIP_T5, - .fw_ver = htobe32_const(FW_VERSION(T5)), + .fw_ver = htobe32(FW_VERSION(T5)), .intfver_nic = FW_INTFVER(T5, NIC), .intfver_vnic = FW_INTFVER(T5, VNIC), .intfver_ofld = FW_INTFVER(T5, OFLD), @@ -3245,7 +3245,7 @@ struct fw_info { .fw_mod_name = "t6fw", .fw_hdr = { .chip = FW_HDR_CHIP_T6, - .fw_ver = htobe32_const(FW_VERSION(T6)), + .fw_ver = htobe32(FW_VERSION(T6)), .intfver_nic = FW_INTFVER(T6, NIC), .intfver_vnic = FW_INTFVER(T6, VNIC), .intfver_ofld = FW_INTFVER(T6, OFLD),