summaryrefslogtreecommitdiffstats
path: root/net/ncsi/internal.h
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-10-04 11:25:47 +1100
committerDavid S. Miller <davem@davemloft.net>2016-10-04 02:11:50 -0400
commitd8cedaabe71236d27da1ff03d32ab1da06ed041f (patch)
treee07609143c4bdacb750823c991578551b021d56c /net/ncsi/internal.h
parent93409033ae653f1c9a949202fb537ab095b2092f (diff)
downloadlinux-d8cedaabe71236d27da1ff03d32ab1da06ed041f.tar.bz2
net/ncsi: Avoid unused-value build warning from ia64-linux-gcc
xchg() is used to set NCSI channel's state in order for consistent access to the state. xchg()'s return value should be used. Otherwise, one build warning will be raised (with -Wunused-value) as below message indicates. It is reported by ia64-linux-gcc (GCC) 4.9.0. net/ncsi/ncsi-manage.c: In function 'ncsi_channel_monitor': arch/ia64/include/uapi/asm/cmpxchg.h:56:2: warning: value computed is \ not used [-Wunused-value] ((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)))) ^ net/ncsi/ncsi-manage.c:202:3: note: in expansion of macro 'xchg' xchg(&nc->state, NCSI_CHANNEL_INACTIVE); This removes the atomic access to NCSI channel's state avoid the above build warning. We have to hold the channel's lock when its state is readed or updated. No functional changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ncsi/internal.h')
0 files changed, 0 insertions, 0 deletions