kernel_samsung_a53x/drivers/infiniband/hw
Leon Romanovsky a335f03b9c RDMA/usnic: Silence uninitialized symbol smatch warnings
[ Upstream commit b9a85e5eec126d6ae6c362f94b447c223e8fe6e4 ]

The patch 1da177e4c3f4: "Linux-2.6.12-rc2" from Apr 16, 2005
(linux-next), leads to the following Smatch static checker warning:

        drivers/infiniband/hw/mthca/mthca_cmd.c:644 mthca_SYS_EN()
        error: uninitialized symbol 'out'.

drivers/infiniband/hw/mthca/mthca_cmd.c
    636 int mthca_SYS_EN(struct mthca_dev *dev)
    637 {
    638         u64 out;
    639         int ret;
    640
    641         ret = mthca_cmd_imm(dev, 0, &out, 0, 0, CMD_SYS_EN, CMD_TIME_CLASS_D);

We pass out here and it gets used without being initialized.

        err = mthca_cmd_post(dev, in_param,
                             out_param ? *out_param : 0,
                                         ^^^^^^^^^^
                             in_modifier, op_modifier,
                             op, context->token, 1);

It's the same in mthca_cmd_wait() and mthca_cmd_poll().

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/533bc3df-8078-4397-b93d-d1f6cec9b636@moroto.mountain
Link: https://lore.kernel.org/r/c559cb7113158c02d75401ac162652072ef1b5f0.1699867650.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:12:38 +01:00
..
bnxt_re RDMA/bnxt_re: Correct module description string 2024-11-18 12:11:41 +01:00
cxgb4 RDMA/cxgb4: Check skb value for failure to allocate 2024-11-08 11:24:52 +01:00
efa Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hfi1 RDMA/hfi1: Use FIELD_GET() to extract Link Width 2024-11-18 11:43:13 +01:00
hns RDMA/hns: Fix signed-unsigned mixed comparisons 2024-11-18 11:43:03 +01:00
i40iw RDMA/irdma: Prevent zero-length STAG registration 2024-11-18 12:10:54 +01:00
mlx4 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mlx5 IB/mlx5: Fix rdma counter binding for RAW QP 2024-11-18 11:43:03 +01:00
mthca RDMA/usnic: Silence uninitialized symbol smatch warnings 2024-11-18 12:12:38 +01:00
ocrdma Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qedr Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qib Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usnic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmw_pvrdma Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00