Deleted Added
full compact
byteorder.h (290135) byteorder.h (290335)
1/*-
2 * Copyright (c) 2010 Isilon Systems, Inc.
3 * Copyright (c) 2010 iX Systems, Inc.
4 * Copyright (c) 2010 Panasas, Inc.
5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2010 Isilon Systems, Inc.
3 * Copyright (c) 2010 iX Systems, Inc.
4 * Copyright (c) 2010 Panasas, Inc.
5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/compat/linuxkpi/common/include/asm/byteorder.h 290135 2015-10-29 08:28:39Z hselasky $
29 * $FreeBSD: head/sys/compat/linuxkpi/common/include/asm/byteorder.h 290335 2015-11-03 12:37:55Z hselasky $
30 */
31#ifndef _ASM_BYTEORDER_H_
32#define _ASM_BYTEORDER_H_
33
34#include <sys/types.h>
35#include <sys/endian.h>
36#include <asm/types.h>
37

--- 43 unchanged lines hidden (view full) ---

81#define cpu_to_be16s(x) do { *((uint16_t *)x) = cpu_to_be16p((x)) } while (0)
82#define be16_to_cpus(x) do { *((uint16_t *)x) = be16_to_cpup((x)) } while (0)
83
84#define swab16 bswap16
85#define swab32 bswap32
86#define swab64 bswap64
87
88static inline void
30 */
31#ifndef _ASM_BYTEORDER_H_
32#define _ASM_BYTEORDER_H_
33
34#include <sys/types.h>
35#include <sys/endian.h>
36#include <asm/types.h>
37

--- 43 unchanged lines hidden (view full) ---

81#define cpu_to_be16s(x) do { *((uint16_t *)x) = cpu_to_be16p((x)) } while (0)
82#define be16_to_cpus(x) do { *((uint16_t *)x) = be16_to_cpup((x)) } while (0)
83
84#define swab16 bswap16
85#define swab32 bswap32
86#define swab64 bswap64
87
88static inline void
89be16_add_cpu(u16 *var, u16 val)
89be16_add_cpu(uint16_t *var, uint16_t val)
90{
91 *var = cpu_to_be16(be16_to_cpu(*var) + val);
92}
93
94#endif /* _ASM_BYTEORDER_H_ */
90{
91 *var = cpu_to_be16(be16_to_cpu(*var) + val);
92}
93
94#endif /* _ASM_BYTEORDER_H_ */