lkml.org 
[lkml]   [2020]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 011/132] RDMA/rxe: Drop pointless checks in rxe_init_ports
    Date
    From: Kamal Heib <kamalheib1@gmail.com>

    [ Upstream commit 6112ef62826e91afbae5446d5d47b38e25f47e3f ]

    Both pkey_tbl_len and gid_tbl_len are set in rxe_init_port_param() - so no
    need to check if they aren't set.

    Fixes: 8700e3e7c485 ("Soft RoCE driver")
    Link: https://lore.kernel.org/r/20200705104313.283034-2-kamalheib1@gmail.com
    Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
    Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/infiniband/sw/rxe/rxe.c | 3 ---
    1 file changed, 3 deletions(-)

    diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
    index a8c11b5e1e943..dee0c2b7897ac 100644
    --- a/drivers/infiniband/sw/rxe/rxe.c
    +++ b/drivers/infiniband/sw/rxe/rxe.c
    @@ -157,9 +157,6 @@ static int rxe_init_ports(struct rxe_dev *rxe)

    rxe_init_port_param(port);

    - if (!port->attr.pkey_tbl_len || !port->attr.gid_tbl_len)
    - return -EINVAL;
    -
    port->pkey_tbl = kcalloc(port->attr.pkey_tbl_len,
    sizeof(*port->pkey_tbl), GFP_KERNEL);

    --
    2.25.1


    \
     
     \ /
      Last update: 2020-09-15 17:19    [W:3.575 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site