• Arnd Bergmann's avatar
    IB/ehca: fix maybe-uninitialized warnings · 704ee89e
    Arnd Bergmann authored
    The driver causes two warnings about possibly uninitialized variables:
    
    drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf':
    drivers/infiniband/hw/ehca/ehca_mrmw.c:1908:4: warning: 'prev_pgaddr' may be used uninitialized in this function [-Wmaybe-uninitialized]
    drivers/infiniband/hw/ehca/ehca_mrmw.c:1924:14: note: 'prev_pgaddr' was declared here
    drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_reg_mr':
    drivers/infiniband/hw/ehca/ehca_mrmw.c:2430:5: warning: 'hret' may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    The first one is definitely a false positive, the second one may or may not
    be one. In both cases, adding an intialization is the safe and easy
    workaround.
    
    The driver was removed in mainline in commit e581d111
    ("staging/rdma: remove deprecated ehca driver"), in linux-4.6.
    In 4.4, the file is located in drivers/staging/rdma/ehca/ehca_mrmw.c,
    and the fix still applies.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    704ee89e
ehca_mrmw.c 71.9 KB