staging: lustre: remove unnecessary parentheses around LNet function pointer
authorJames Simmons <jsimmons@infradead.org>
Fri, 12 Feb 2016 17:06:02 +0000 (12:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Feb 2016 00:20:32 +0000 (16:20 -0800)
No need for the parentheses around any function pointer.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
drivers/staging/lustre/lnet/lnet/api-ni.c
drivers/staging/lustre/lnet/lnet/lib-move.c
drivers/staging/lustre/lnet/lnet/router.c

index fbcbb97dda1f9d2a461b0a24b40c4a2848cf42f2..cbf5d0a495d21195202878df42af3bf09c74592b 100644 (file)
@@ -2185,7 +2185,7 @@ kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob)
        rej.ibr_why = IBLND_REJECT_FATAL;
        rej.ibr_cp.ibcp_max_msg_size = IBLND_MSG_SIZE;
 
-       peer_addr = (struct sockaddr_in *)&(cmid->route.addr.dst_addr);
+       peer_addr = (struct sockaddr_in *)&cmid->route.addr.dst_addr;
        if (*kiblnd_tunables.kib_require_priv_port &&
            ntohs(peer_addr->sin_port) >= PROT_SOCK) {
                __u32 ip = ntohl(peer_addr->sin_addr.s_addr);
index aeef4803ee60590809e2e5cf6e88b83b90f5d5f1..e59fbfb668775f09d5085fc6ede765db36dabcee 100644 (file)
@@ -935,7 +935,7 @@ lnet_shutdown_lndnis(void)
                islo = ni->ni_lnd->lnd_type == LOLND;
 
                LASSERT(!in_interrupt());
-               (ni->ni_lnd->lnd_shutdown)(ni);
+               ni->ni_lnd->lnd_shutdown(ni);
 
                /*
                 * can't deref lnd anymore now; it might have unregistered
@@ -1023,7 +1023,7 @@ lnet_startup_lndnis(void)
 
                ni->ni_lnd = lnd;
 
-               rc = (lnd->lnd_startup)(ni);
+               rc = lnd->lnd_startup(ni);
 
                mutex_unlock(&the_lnet.ln_lnd_mutex);
 
index 7e1ef1865e5c0850e48d4789b5645cedc5c0681c..afc4522ea77d5bf47e6bc033af7b99627d30cff2 100644 (file)
@@ -599,8 +599,8 @@ lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed,
                }
        }
 
-       rc = (ni->ni_lnd->lnd_recv)(ni, private, msg, delayed,
-                                   niov, iov, kiov, offset, mlen, rlen);
+       rc = ni->ni_lnd->lnd_recv(ni, private, msg, delayed,
+                                 niov, iov, kiov, offset, mlen, rlen);
        if (rc < 0)
                lnet_finalize(ni, msg, rc);
 }
@@ -655,7 +655,7 @@ lnet_ni_send(lnet_ni_t *ni, lnet_msg_t *msg)
        LASSERT(LNET_NETTYP(LNET_NIDNET(ni->ni_nid)) == LOLND ||
                (msg->msg_txcredit && msg->msg_peertxcredit));
 
-       rc = (ni->ni_lnd->lnd_send)(ni, priv, msg);
+       rc = ni->ni_lnd->lnd_send(ni, priv, msg);
        if (rc < 0)
                lnet_finalize(ni, msg, rc);
 }
@@ -671,8 +671,8 @@ lnet_ni_eager_recv(lnet_ni_t *ni, lnet_msg_t *msg)
        LASSERT(ni->ni_lnd->lnd_eager_recv != NULL);
 
        msg->msg_rx_ready_delay = 1;
-       rc = (ni->ni_lnd->lnd_eager_recv)(ni, msg->msg_private, msg,
-                                         &msg->msg_private);
+       rc = ni->ni_lnd->lnd_eager_recv(ni, msg->msg_private, msg,
+                                       &msg->msg_private);
        if (rc != 0) {
                CERROR("recv from %s / send to %s aborted: eager_recv failed %d\n",
                       libcfs_nid2str(msg->msg_rxpeer->lp_nid),
@@ -693,7 +693,7 @@ lnet_ni_query_locked(lnet_ni_t *ni, lnet_peer_t *lp)
        LASSERT(ni->ni_lnd->lnd_query != NULL);
 
        lnet_net_unlock(lp->lp_cpt);
-       (ni->ni_lnd->lnd_query)(ni, lp->lp_nid, &last_alive);
+       ni->ni_lnd->lnd_query(ni, lp->lp_nid, &last_alive);
        lnet_net_lock(lp->lp_cpt);
 
        lp->lp_last_query = cfs_time_current();
index 754f7f071bbea17993cb436312e6f9f3a065fa20..e447b1a13a654722bde8e842e6885c24b5813085 100644 (file)
@@ -157,7 +157,7 @@ lnet_ni_notify_locked(lnet_ni_t *ni, lnet_peer_t *lp)
                         * A new notification could happen now; I'll handle it
                         * when control returns to me
                         */
-                       (ni->ni_lnd->lnd_notify)(ni, lp->lp_nid, alive);
+                       ni->ni_lnd->lnd_notify(ni, lp->lp_nid, alive);
 
                        lnet_net_lock(lp->lp_cpt);
                }
@@ -389,7 +389,7 @@ lnet_add_route(__u32 net, unsigned int hops, lnet_nid_t gateway,
 
                /* XXX Assume alive */
                if (ni->ni_lnd->lnd_notify != NULL)
-                       (ni->ni_lnd->lnd_notify)(ni, gateway, 1);
+                       ni->ni_lnd->lnd_notify(ni, gateway, 1);
 
                lnet_net_lock(LNET_LOCK_EX);
        }