[linus:master 78/90] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:895:6-54: duplicated argument to && or ||

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Roland,

Some coccinelle warnings are found:

drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:895:6-54: duplicated argument to && or ||
drivers/infiniband/core/cma.c:3067:1-3: WARNING: PTR_RET can be used
drivers/infiniband/core/ucma.c:1005:10-17: WARNING opportunity for memdep_user

And the 2nd one can be quieted by the attached patch :)

---
0-DAY kernel build testing backend         Open Source Technology Centre
Fengguang Wu <wfg@xxxxxxxxxxxxxxx>                     Intel Corporation
spatch: api/ptr_ret.cocci


 Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR

--- /c/kernel-tests/src/linux/drivers/infiniband/core/cma.c
+++ /tmp/cocci-output-51533-104088-cma.c
@@ -3064,10 +3064,7 @@ static int cma_join_ib_multicast(struct
 						id_priv->id.port_num, &rec,
 						comp_mask, GFP_KERNEL,
 						cma_ib_mc_handler, mc);
-	if (IS_ERR(mc->multicast.ib))
-		return PTR_ERR(mc->multicast.ib);
-
-	return 0;
+	return PTR_RET(mc->multicast.ib);
 }
 
 static void iboe_mcast_work_handler(struct work_struct *work)

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux