aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/svc_xprt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sunrpc/svc_xprt.h')
-rw-r--r--include/linux/sunrpc/svc_xprt.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index 0d9cb6ef28b0..d790c52525cc 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -118,7 +118,7 @@ static inline unsigned short svc_addr_port(const struct sockaddr *sa)
118 return 0; 118 return 0;
119} 119}
120 120
121static inline size_t svc_addr_len(struct sockaddr *sa) 121static inline size_t svc_addr_len(const struct sockaddr *sa)
122{ 122{
123 switch (sa->sa_family) { 123 switch (sa->sa_family) {
124 case AF_INET: 124 case AF_INET:
@@ -126,7 +126,8 @@ static inline size_t svc_addr_len(struct sockaddr *sa)
126 case AF_INET6: 126 case AF_INET6:
127 return sizeof(struct sockaddr_in6); 127 return sizeof(struct sockaddr_in6);
128 } 128 }
129 return -EAFNOSUPPORT; 129
130 return 0;
130} 131}
131 132
132static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt) 133static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt)