aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2011-03-13 14:55:55 -0400
committerSteve French <sfrench@us.ibm.com>2011-04-11 20:49:08 -0400
commit6da9791061ca3b7b3c7eb7350eb452443f40a0e5 (patch)
treec1bded8c22287683706708a0c96c66197135d8de /fs/cifs
parent2e325d5973b99bb7421e689351ca74f349eee5ea (diff)
Elminate sparse __CHECK_ENDIAN__ warnings on port conversion
Ports are __be16 not unsigned short int Eliminates the remaining fixable endian warnings: ~/cifs-2.6$ make modules C=1 M=fs/cifs CF=-D__CHECK_ENDIAN__ CHECK fs/cifs/connect.c fs/cifs/connect.c:2408:23: warning: incorrect type in assignment (different base types) fs/cifs/connect.c:2408:23: expected unsigned short *sport fs/cifs/connect.c:2408:23: got restricted __be16 *<noident> fs/cifs/connect.c:2410:23: warning: incorrect type in assignment (different base types) fs/cifs/connect.c:2410:23: expected unsigned short *sport fs/cifs/connect.c:2410:23: got restricted __be16 *<noident> fs/cifs/connect.c:2416:24: warning: incorrect type in assignment (different base types) fs/cifs/connect.c:2416:24: expected unsigned short [unsigned] [short] <noident> fs/cifs/connect.c:2416:24: got restricted __be16 [usertype] <noident> fs/cifs/connect.c:2423:24: warning: incorrect type in assignment (different base types) fs/cifs/connect.c:2423:24: expected unsigned short [unsigned] [short] <noident> fs/cifs/connect.c:2423:24: got restricted __be16 [usertype] <noident> fs/cifs/connect.c:2326:23: warning: incorrect type in assignment (different base types) fs/cifs/connect.c:2326:23: expected unsigned short [unsigned] sport fs/cifs/connect.c:2326:23: got restricted __be16 [usertype] sin6_port fs/cifs/connect.c:2330:23: warning: incorrect type in assignment (different base types) fs/cifs/connect.c:2330:23: expected unsigned short [unsigned] sport fs/cifs/connect.c:2330:23: got restricted __be16 [usertype] sin_port fs/cifs/connect.c:2394:22: warning: restricted __be16 degrades to integer Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/connect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 54436a3a3348..94a05a681f84 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1473,7 +1473,7 @@ srcip_matches(struct sockaddr *srcaddr, struct sockaddr *rhs)
1473static bool 1473static bool
1474match_port(struct TCP_Server_Info *server, struct sockaddr *addr) 1474match_port(struct TCP_Server_Info *server, struct sockaddr *addr)
1475{ 1475{
1476 unsigned short int port, *sport; 1476 __be16 port, *sport;
1477 1477
1478 switch (addr->sa_family) { 1478 switch (addr->sa_family) {
1479 case AF_INET: 1479 case AF_INET:
@@ -2281,7 +2281,7 @@ static int
2281generic_ip_connect(struct TCP_Server_Info *server) 2281generic_ip_connect(struct TCP_Server_Info *server)
2282{ 2282{
2283 int rc = 0; 2283 int rc = 0;
2284 unsigned short int sport; 2284 __be16 sport;
2285 int slen, sfamily; 2285 int slen, sfamily;
2286 struct socket *socket = server->ssocket; 2286 struct socket *socket = server->ssocket;
2287 struct sockaddr *saddr; 2287 struct sockaddr *saddr;
@@ -2366,7 +2366,7 @@ generic_ip_connect(struct TCP_Server_Info *server)
2366static int 2366static int
2367ip_connect(struct TCP_Server_Info *server) 2367ip_connect(struct TCP_Server_Info *server)
2368{ 2368{
2369 unsigned short int *sport; 2369 __be16 *sport;
2370 struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr; 2370 struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr;
2371 struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr; 2371 struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr;
2372 2372