Commit 78c48618 authored by Nikola Jelic's avatar Nikola Jelic Committed by Greg Kroah-Hartman

lustre: ko2iblnd: removed forced u32 casts after htonl

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: default avatarNikola Jelic <nikola.jelic83@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 135e55f1
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment