All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: kbuild-all@01.org, linux-usb@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] usb: xhci-mtk: fix ptr_ret.cocci warnings
Date: Wed, 25 Oct 2017 00:33:18 +0800	[thread overview]
Message-ID: <20171024163318.GA20883@lkp-wsm-ep2> (raw)
In-Reply-To: <201710250012.ie44N5j6%fengguang.wu@intel.com>

drivers/usb/host/xhci-mtk.c:256:1-3: WARNING: PTR_ERR_OR_ZERO can be used


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

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: b6bb72cf0df1 ("usb: xhci-mtk: add optional mcu and dma bus clocks")
CC: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 xhci-mtk.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -253,10 +253,7 @@ static int xhci_mtk_clks_get(struct xhci
 		return PTR_ERR(mtk->mcu_clk);
 
 	mtk->dma_clk = optional_clk_get(dev, "dma_ck");
-	if (IS_ERR(mtk->dma_clk))
-		return PTR_ERR(mtk->dma_clk);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(mtk->dma_clk);
 }
 
 static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <fengguang.wu@intel.com>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org, kbuild-all@01.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH] usb: xhci-mtk: fix ptr_ret.cocci warnings
Date: Wed, 25 Oct 2017 00:33:18 +0800	[thread overview]
Message-ID: <20171024163318.GA20883@lkp-wsm-ep2> (raw)
In-Reply-To: <201710250012.ie44N5j6%fengguang.wu@intel.com>

drivers/usb/host/xhci-mtk.c:256:1-3: WARNING: PTR_ERR_OR_ZERO can be used


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

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: b6bb72cf0df1 ("usb: xhci-mtk: add optional mcu and dma bus clocks")
CC: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 xhci-mtk.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -253,10 +253,7 @@ static int xhci_mtk_clks_get(struct xhci
 		return PTR_ERR(mtk->mcu_clk);
 
 	mtk->dma_clk = optional_clk_get(dev, "dma_ck");
-	if (IS_ERR(mtk->dma_clk))
-		return PTR_ERR(mtk->dma_clk);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(mtk->dma_clk);
 }
 
 static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)

WARNING: multiple messages have this Message-ID (diff)
From: fengguang.wu@intel.com (kbuild test robot)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] usb: xhci-mtk: fix ptr_ret.cocci warnings
Date: Wed, 25 Oct 2017 00:33:18 +0800	[thread overview]
Message-ID: <20171024163318.GA20883@lkp-wsm-ep2> (raw)
In-Reply-To: <201710250012.ie44N5j6%fengguang.wu@intel.com>

drivers/usb/host/xhci-mtk.c:256:1-3: WARNING: PTR_ERR_OR_ZERO can be used


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

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: b6bb72cf0df1 ("usb: xhci-mtk: add optional mcu and dma bus clocks")
CC: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 xhci-mtk.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -253,10 +253,7 @@ static int xhci_mtk_clks_get(struct xhci
 		return PTR_ERR(mtk->mcu_clk);
 
 	mtk->dma_clk = optional_clk_get(dev, "dma_ck");
-	if (IS_ERR(mtk->dma_clk))
-		return PTR_ERR(mtk->dma_clk);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(mtk->dma_clk);
 }
 
 static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)

       reply	other threads:[~2017-10-24 16:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201710250012.ie44N5j6%fengguang.wu@intel.com>
2017-10-24 16:33 ` kbuild test robot [this message]
2017-10-24 16:33   ` [PATCH] usb: xhci-mtk: fix ptr_ret.cocci warnings kbuild test robot
2017-10-24 16:33   ` kbuild test robot
2017-10-25  1:11   ` Chunfeng Yun
2017-10-25  1:11     ` Chunfeng Yun
2017-10-25  1:11     ` Chunfeng Yun

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=20171024163318.GA20883@lkp-wsm-ep2 \
    --to=fengguang.wu@intel.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=matthias.bgg@gmail.com \
    /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.