linux_dsm_epyc7002/drivers/infiniband/hw/hns
Arnd Bergmann 5b0ff9a007 infiniband: hns: avoid gcc-7.0.1 warning for uninitialized data
hns_roce_v1_cq_set_ci() calls roce_set_bit() on an uninitialized field,
which will then change only a few of its bits, causing a warning with
the latest gcc:

infiniband/hw/hns/hns_roce_hw_v1.c: In function 'hns_roce_v1_cq_set_ci':
infiniband/hw/hns/hns_roce_hw_v1.c:1854:23: error: 'doorbell[1]' is used uninitialized in this function [-Werror=uninitialized]
  roce_set_bit(doorbell[1], ROCEE_DB_OTHERS_H_ROCEE_DB_OTH_HW_SYNS_S, 1);

The code is actually correct since we always set all bits of the
port_vlan field, but gcc correctly points out that the first
access does contain uninitialized data.

This initializes the field to zero first before setting the
individual bits.

Fixes: 9a4435375c ("IB/hns: Add driver files for hns RoCE driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-04-25 15:16:38 -04:00
..
hns_roce_ah.c IB/core: Let create_ah return extended response to user 2016-12-13 13:38:27 -05:00
hns_roce_alloc.c IB/hns: Change qpn allocation to round-robin mode. 2016-12-03 14:20:42 -05:00
hns_roce_cmd.c IB/hns: Use kmalloc_array() in hns_roce_cmd_use_events() 2017-04-20 16:31:49 -04:00
hns_roce_cmd.h IB/hns: Fix the bug when free mr 2016-12-03 14:20:42 -05:00
hns_roce_common.h IB/hns: Fix the bug when free cq 2016-12-03 14:20:42 -05:00
hns_roce_cq.c IB/hns: Move HNS RoCE user vendor structures 2016-12-03 14:23:14 -05:00
hns_roce_device.h Merge branch 'mlx' into merge-test 2016-12-14 14:44:25 -05:00
hns_roce_eq.c IB/hns: Fix for Checkpatch.pl comment style errors 2016-12-03 14:20:42 -05:00
hns_roce_eq.h IB/hns: Optimize code of aeq and ceq interrupt handle and fix the bug of qpn 2016-10-03 11:43:15 -04:00
hns_roce_hem.c IB/hns: Fix for Checkpatch.pl comment style errors 2016-12-03 14:20:42 -05:00
hns_roce_hem.h IB/hns: Fix bug of clear hem 2016-10-03 11:43:15 -04:00
hns_roce_hw_v1.c infiniband: hns: avoid gcc-7.0.1 warning for uninitialized data 2017-04-25 15:16:38 -04:00
hns_roce_hw_v1.h IB/hns: Fix the bug when free mr 2016-12-03 14:20:42 -05:00
hns_roce_main.c This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
hns_roce_mr.c IB/hns: Use kcalloc() in hns_roce_buddy_init() 2017-04-20 16:31:49 -04:00
hns_roce_pd.c IB/hns: Change qpn allocation to round-robin mode. 2016-12-03 14:20:42 -05:00
hns_roce_qp.c IB/hns: Switch from dma_device to dev.parent 2017-01-24 12:23:35 -05:00
Kconfig IB/hns: Kconfig and Makefile for RoCE module 2016-08-22 14:02:33 -04:00
Makefile IB/hns: Kconfig and Makefile for RoCE module 2016-08-22 14:02:33 -04:00