]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA: Add missed = {} initialization to uresp structs
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 12 May 2026 00:09:38 +0000 (21:09 -0300)
committerLeon Romanovsky <leon@kernel.org>
Mon, 18 May 2026 08:58:42 +0000 (04:58 -0400)
All of these are fully initialized so no bugs are being fixed. Add
the missing initializer as a precaution against future changes.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/erdma/erdma_verbs.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx5/main.c

index 7ed294516b7edbea7caa04313dbb99ef449d63c5..ccb362d6d2e669160174cc562d4e3d8d22b110db 100644 (file)
@@ -1884,7 +1884,7 @@ int bnxt_re_create_qp(struct ib_qp *ib_qp, struct ib_qp_init_attr *qp_init_attr,
                }
 
                if (udata) {
-                       struct bnxt_re_qp_resp resp;
+                       struct bnxt_re_qp_resp resp = {};
 
                        resp.qpid = qp->qplib_qp.id;
                        resp.rsvd = 0;
index 92a65970ab6fa15c0b5a6f01ac2117d0f0b3ffc6..c8a35337ba51e8626a64e60fefd1389496ca26fb 100644 (file)
@@ -1977,7 +1977,7 @@ int erdma_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
 
        if (!rdma_is_kernel_res(&ibcq->res)) {
                struct erdma_ureq_create_cq ureq;
-               struct erdma_uresp_create_cq uresp;
+               struct erdma_uresp_create_cq uresp = {};
 
                ret = ib_copy_validate_udata_in(udata, ureq, rsvd0);
                if (ret)
index 25f9738bd7722398fbc4f262a2cee699f15025db..d50743f090bf216cea15eeac9845f0ce17bc587f 100644 (file)
@@ -1090,8 +1090,8 @@ static int mlx4_ib_alloc_ucontext(struct ib_ucontext *uctx,
        struct ib_device *ibdev = uctx->device;
        struct mlx4_ib_dev *dev = to_mdev(ibdev);
        struct mlx4_ib_ucontext *context = to_mucontext(uctx);
-       struct mlx4_ib_alloc_ucontext_resp_v3 resp_v3;
-       struct mlx4_ib_alloc_ucontext_resp resp;
+       struct mlx4_ib_alloc_ucontext_resp_v3 resp_v3 = {};
+       struct mlx4_ib_alloc_ucontext_resp resp = {};
        int err;
 
        if (!dev->ib_active)
index 302f0a13051bab7cdf88116e3f3e23f1c0272ece..428811fa805b68bf6a011685e027b8407a3e1719 100644 (file)
@@ -2777,7 +2777,7 @@ static int mlx5_ib_alloc_pd(struct ib_pd *ibpd, struct ib_udata *udata)
 {
        struct mlx5_ib_pd *pd = to_mpd(ibpd);
        struct ib_device *ibdev = ibpd->device;
-       struct mlx5_ib_alloc_pd_resp resp;
+       struct mlx5_ib_alloc_pd_resp resp = {};
        int err;
        u32 out[MLX5_ST_SZ_DW(alloc_pd_out)] = {};
        u32 in[MLX5_ST_SZ_DW(alloc_pd_in)] = {};