Skip to contentSkip to conversation

drivers: infiniband: core: Remove extra parentheses

PATCH Applied Varsha Rao 2 participants 3 messages Jul 25, 2018 – Jul 26, 2018 InfiniBand

lore
Share & tools
lore

Varsha Rao

author
#0 lore raw

PATCH 1/1 drivers: infiniband: core: Remove extra parentheses

Remove unnecessary parentheses to fix the clang warning of extraneous parentheses.

---
 drivers/infiniband/core/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/cma.c +1 -1
index bff10ab141b0..c200a2e748f0 100644
@@ -4010,7 +4010,7 @@ static void cma_set_mgid(struct rdma_id_private *id_priv,
 		memcpy(mgid, &sin6->sin6_addr, sizeof *mgid);
 	} else if (addr->sa_family == AF_IB) {
 		memcpy(mgid, &((struct sockaddr_ib *) addr)->sib_addr, sizeof *mgid);
-	} else if ((addr->sa_family == AF_INET6)) {
+	} else if (addr->sa_family == AF_INET6) {
 		ipv6_ib_mc_map(&sin6->sin6_addr, dev_addr->broadcast, mc_map);
 		if (id_priv->id.ps == RDMA_PS_UDP)
 			mc_map[7] = 0x01;	/* Use RDMA CM signature */
Signature · 1 line
2.17.0
#1 lore raw
Quoted 7 lines · Varsha Rao

Remove unnecessary parentheses to fix the clang warning of extraneous parentheses.

---
 drivers/infiniband/core/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Curious, what configuration are you using clang with? I'd like to have it run here..

Jason

author
#2 lore raw

Hi Jason,

Quoted 9 lines · Jason Gunthorpe
Quoted 7 lines · Varsha Rao

Remove unnecessary parentheses to fix the clang warning of extraneous parentheses.

---
 drivers/infiniband/core/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 6 lines

Applied to for-next, thanks

Curious, what configuration are you using clang with? I'd like to have it run here..

I have the list of warnings from previous kernel build, for which

compiling with clang was possible. I sent the patch as the warning was still valid for the latest kernel too.

Thanks,
Varsha