All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: kernel-janitors@vger.kernel.org
Subject: [linus:master 78/90] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:895:6-54: duplicated argument to
Date: Wed, 25 Jul 2012 12:18:21 +0000	[thread overview]
Message-ID: <20120725121821.GB28963@localhost> (raw)

[-- 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)

                 reply	other threads:[~2012-07-25 12:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120725121821.GB28963@localhost \
    --to=fengguang.wu@intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.