lustre: ko2iblnd: removed forced u32 casts after htonl
authorNikola Jelic <nikola.jelic83@gmail.com>
Fri, 19 May 2017 18:48:07 +0000 (20:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Jun 2017 08:32:41 +0000 (17:32 +0900)
sockaddr_in.sin_addr.s_addr is __be32 integral type, so the (__force u32)
cast after the htonl call is unnecessary, and also detected by sparse:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2309:33: warning: incorrect type in assignment (different base types)
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2381:30: warning: incorrect type in assignment (different base types)

Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c

index 79321e4..0520f02 100644 (file)
@@ -2306,7 +2306,7 @@ static int kiblnd_dev_need_failover(struct kib_dev *dev)
 
        memset(&srcaddr, 0, sizeof(srcaddr));
        srcaddr.sin_family = AF_INET;
-       srcaddr.sin_addr.s_addr = (__force u32)htonl(dev->ibd_ifip);
+       srcaddr.sin_addr.s_addr = htonl(dev->ibd_ifip);
 
        memset(&dstaddr, 0, sizeof(dstaddr));
        dstaddr.sin_family = AF_INET;
@@ -2378,7 +2378,7 @@ int kiblnd_dev_failover(struct kib_dev *dev)
 
        memset(&addr, 0, sizeof(addr));
        addr.sin_family      = AF_INET;
-       addr.sin_addr.s_addr = (__force u32)htonl(dev->ibd_ifip);
+       addr.sin_addr.s_addr = htonl(dev->ibd_ifip);
        addr.sin_port   = htons(*kiblnd_tunables.kib_service);
 
        /* Bind to failover device or port */