public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [linus:master 78/90] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:895:6-54: duplicated argument to
@ 2012-07-25 12:18 Fengguang Wu
  0 siblings, 0 replies; only message in thread
From: Fengguang Wu @ 2012-07-25 12:18 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

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@linux.intel.com>                     Intel Corporation

[-- Attachment #2: 44437-44445.patch --]
[-- Type: text/x-diff, Size: 527 bytes --]

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-25 12:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-25 12:18 [linus:master 78/90] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:895:6-54: duplicated argument to Fengguang Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox