[RXRPC]: Decrease number of pointer derefs in connection.c

Decrease the number of pointer derefs in net/rxrpc/connection.c

Benefits of the patch:
- Fewer pointer dereferences should make the code slightly faster.
- Size of generated code is smaller
- improved readability

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jesper Juhl and committed by
David S. Miller
ea2e90df ad8e4b75

+8 -6
+8 -6
net/rxrpc/connection.c
··· 220 220 { 221 221 struct rxrpc_connection *conn, *candidate = NULL; 222 222 struct list_head *_p; 223 + struct sk_buff *pkt = msg->pkt; 223 224 int ret, fresh = 0; 224 225 __be32 x_epoch, x_connid; 225 226 __be16 x_port, x_servid; ··· 230 229 _enter("%p{{%hu}},%u,%hu", 231 230 peer, 232 231 peer->trans->port, 233 - ntohs(msg->pkt->h.uh->source), 232 + ntohs(pkt->h.uh->source), 234 233 ntohs(msg->hdr.serviceId)); 235 234 236 - x_port = msg->pkt->h.uh->source; 235 + x_port = pkt->h.uh->source; 237 236 x_epoch = msg->hdr.epoch; 238 237 x_clflag = msg->hdr.flags & RXRPC_CLIENT_INITIATED; 239 238 x_connid = htonl(ntohl(msg->hdr.cid) & RXRPC_CIDMASK); ··· 268 267 /* fill in the specifics */ 269 268 candidate->addr.sin_family = AF_INET; 270 269 candidate->addr.sin_port = x_port; 271 - candidate->addr.sin_addr.s_addr = msg->pkt->nh.iph->saddr; 270 + candidate->addr.sin_addr.s_addr = pkt->nh.iph->saddr; 272 271 candidate->in_epoch = x_epoch; 273 272 candidate->out_epoch = x_epoch; 274 273 candidate->in_clientflag = RXRPC_CLIENT_INITIATED; ··· 676 675 struct rxrpc_message *msg) 677 676 { 678 677 struct rxrpc_message *pmsg; 678 + struct dst_entry *dst; 679 679 struct list_head *_p; 680 680 unsigned cix, seq; 681 681 int ret = 0; ··· 712 710 713 711 call->pkt_rcv_count++; 714 712 715 - if (msg->pkt->dst && msg->pkt->dst->dev) 713 + dst = msg->pkt->dst; 714 + if (dst && dst->dev) 716 715 conn->peer->if_mtu = 717 - msg->pkt->dst->dev->mtu - 718 - msg->pkt->dst->dev->hard_header_len; 716 + dst->dev->mtu - dst->dev->hard_header_len; 719 717 720 718 /* queue on the call in seq order */ 721 719 rxrpc_get_message(msg);