freebsd-nq/sys
Dimitry Andric d4ddb330c9 Fix the following clang warning in sys/dev/dcons/dcons.c, caused by the
recent changes in sys/x86/include/endian.h:

  sys/dev/dcons/dcons.c:190:15: error: implicit conversion from '__uint32_t' (aka 'unsigned int') to '__uint16_t' (aka 'unsigned short') changes value from 1684238190 to 28526 [-Werror,-Wconstant-conversion]
	  buf->magic = ntohl(DCONS_MAGIC);
		       ^~~~~~~~~~~~~~~~~~
  sys/sys/param.h:306:18: note: expanded from:
  #define ntohl(x)        __ntohl(x)
			  ^
  ./x86/endian.h:128:20: note: expanded from:
  #define __ntohl(x)      __bswap32(x)
			  ^
  ./x86/endian.h:78:20: note: expanded from:
	      __bswap32_gen((__uint32_t)(x)) : __bswap32_var(x))
			    ^
  ./x86/endian.h:68:26: note: expanded from:
	  (((__uint32_t)__bswap16(x) << 16) | __bswap16((x) >> 16))
				  ^
  ./x86/endian.h:75:53: note: expanded from:
	      __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x)))
					       ~~~~~~~~~~~~~ ^

This is because the __bswapXX_gen() macros (for x86) call the regular
__bswapXX() macros.  Since the __bswapXX_gen() variants are only called
when their arguments are constant, there is no need to do that constancy
check recursively.  Also, it causes the above error with clang.

Fix it by calling __bswap16_gen() from __bswap32_gen(), and similarly,
__bswap32_gen() from  __bswap64_gen().

While here, add extra parentheses around the __bswap16_gen() macro
expansion, to prevent unexpected side effects.
2012-03-24 10:07:21 +00:00
..
amd64 Add snd_cmi, snd_csa and snd_emu10kx to GENERIC on i386 and amd64. 2012-03-22 16:19:04 +00:00
arm Remove pty(4) from our kernel configurations. 2012-03-21 08:38:42 +00:00
boot Improve FDT handling in loader(8) and make it more robust. 2012-03-22 20:34:26 +00:00
bsm
cam Add LUN resizing to CTL. Also make it possible to explicitly set 2012-03-06 13:43:57 +00:00
cddl Add device part of DTrace/MIPS code 2012-03-24 05:14:37 +00:00
compat Remove some unnecessary includes. 2012-03-18 19:15:11 +00:00
conf Work around the following clang warning in mps(4): 2012-03-23 11:35:01 +00:00
contrib Update the firmware to version 0.236 2012-03-21 19:09:52 +00:00
crypto
ddb
dev As it turns out, mpi_cnfg.h already is included by mpt.h. 2012-03-24 00:37:56 +00:00
fs Add sysctl vfs.nfs.nfs_keep_dirty_on_error to switch the nfs client 2012-03-17 23:03:20 +00:00
gdb
geom Check that scheme is not already registered. This may happens when a 2012-03-23 07:26:17 +00:00
gnu/fs Remove fifo.h. The only used function declaration from the header is 2012-03-11 12:19:58 +00:00
i386 Add snd_cmi, snd_csa and snd_emu10kx to GENERIC on i386 and amd64. 2012-03-22 16:19:04 +00:00
ia64 Remove pty(4) from our kernel configurations. 2012-03-21 08:38:42 +00:00
isa
kern Add a sysctl to set and retrieve binary osreldate of another process. 2012-03-23 20:05:41 +00:00
kgssapi
libkern Declare the CRC lookup-tables const as they hardly should change at 2012-03-21 20:55:21 +00:00
mips Remap PMC interrupt for all cores 2012-03-24 06:28:15 +00:00
modules Jusy use i386 version of cyclic_machdep.c on all supported architectures. 2012-03-24 05:16:26 +00:00
net Retire the IF_ADDR_LOCK() and IF_ADDR_UNLOCK() compat macros from HEAD. 2012-03-19 21:09:12 +00:00
net80211 Re-commit this - store the alq payload in network order. 2012-03-21 03:19:50 +00:00
netatalk Fix typos 2012-02-28 15:07:05 +00:00
netgraph Use rt_numfibs variable instead of compile-time RT_NUMFIBS. 2012-03-13 11:08:40 +00:00
netinet Small cleanup of the code. No functional change (in FreeBSD kernel). 2012-03-22 16:22:16 +00:00
netinet6 in6_pcblookup_local() still can return a pcb with NULL 2012-03-21 08:43:38 +00:00
netipsec
netipx
netnatm
netncp
netsmb
nfs
nfsclient Remove fifo.h. The only used function declaration from the header is 2012-03-11 12:19:58 +00:00
nfsserver
nlm
ofed Fix build of OFED bits with debugging options enabled. 2012-03-19 19:53:53 +00:00
opencrypto
pc98 Remove pty(4) from our kernel configurations. 2012-03-21 08:38:42 +00:00
pci Use correct Config registers for RTL8139 family. Unlike RTL8168 and 2012-02-25 04:54:51 +00:00
powerpc Remove pty(4) from our kernel configurations. 2012-03-21 08:38:42 +00:00
rpc
security
sparc64 Remove pty(4) from our kernel configurations. 2012-03-21 08:38:42 +00:00
sys Add define for MIPS.options 2012-03-23 22:52:23 +00:00
teken
tools
ufs Supply boolean as the second argument to ffs_update(), and not a 2012-03-13 22:04:27 +00:00
vm Handle spurious page faults that may occur in no-fault sections of the 2012-03-22 04:52:51 +00:00
x86 Fix the following clang warning in sys/dev/dcons/dcons.c, caused by the 2012-03-24 10:07:21 +00:00
xdr
xen blkif interface comment cleanups. No functional changes 2012-02-29 17:47:01 +00:00
Makefile Add sys/ofed to the 'make cscope' target. 2012-03-20 18:05:15 +00:00