mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Igor Stoppa <igor.stoppa@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: igor.stoppa@gmail.com, Igor Stoppa <igor.stoppa@huawei.com>,
	Rob Clark <robdclark@gmail.com>, David Airlie <airlied@linux.ie>,
	Archit Taneja <architt@codeaurora.org>,
	Stephane Viau <sviau@codeaurora.org>
Subject: [PATCH 08/23] drm: remove unnecessary unlikely()
Date: Fri, 31 Aug 2018 01:34:14 +0300	[thread overview]
Message-ID: <20180830223429.30051-9-igor.stoppa@huawei.com> (raw)
In-Reply-To: <20180830223429.30051-1-igor.stoppa@huawei.com>

WARN_ON() already contains an unlikely(), so it's not necessary to wrap it
into another.

Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Stephane Viau <sviau@codeaurora.org>
---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 4 ++--
 drivers/gpu/drm/msm/disp/mdp_format.c    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
index f93d5681267c..9e0b3730536d 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
@@ -261,7 +261,7 @@ int mdp5_ctl_set_cursor(struct mdp5_ctl *ctl, struct mdp5_pipeline *pipeline,
 	u32 blend_cfg;
 	struct mdp5_hw_mixer *mixer = pipeline->mixer;
 
-	if (unlikely(WARN_ON(!mixer))) {
+	if (WARN_ON(!mixer)) {
 		dev_err(ctl_mgr->dev->dev, "CTL %d cannot find LM",
 			ctl->id);
 		return -EINVAL;
@@ -703,7 +703,7 @@ struct mdp5_ctl_manager *mdp5_ctlm_init(struct drm_device *dev,
 		goto fail;
 	}
 
-	if (unlikely(WARN_ON(ctl_cfg->count > MAX_CTL))) {
+	if (WARN_ON(ctl_cfg->count > MAX_CTL)) {
 		dev_err(dev->dev, "Increase static pool size to at least %d\n",
 				ctl_cfg->count);
 		ret = -ENOSPC;
diff --git a/drivers/gpu/drm/msm/disp/mdp_format.c b/drivers/gpu/drm/msm/disp/mdp_format.c
index 005760bee708..005f24dcfbdd 100644
--- a/drivers/gpu/drm/msm/disp/mdp_format.c
+++ b/drivers/gpu/drm/msm/disp/mdp_format.c
@@ -185,7 +185,7 @@ const struct msm_format *mdp_get_format(struct msm_kms *kms, uint32_t format,
 
 struct csc_cfg *mdp_get_default_csc_cfg(enum csc_type type)
 {
-	if (unlikely(WARN_ON(type >= CSC_MAX)))
+	if (WARN_ON(type >= CSC_MAX))
 		return NULL;
 
 	return &csc_convert[type];
-- 
2.17.1


  parent reply	other threads:[~2018-08-30 22:35 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180830223429.30051-1-igor.stoppa@huawei.com>
2018-08-30 22:34 ` [PATCH 01/23] infiniband: nes: add unlikely() to assert() Igor Stoppa
2018-08-31 14:06   ` Doug Ledford
2018-08-30 22:34 ` [PATCH 02/23] ethernet: hnae: " Igor Stoppa
2018-08-30 22:34 ` [PATCH 03/23] asm-generic: bug: add unlikely() to BUG_ON() Igor Stoppa
2018-08-30 22:34 ` [PATCH 04/23] mips: " Igor Stoppa
2018-08-30 22:34 ` [PATCH 05/23] selftest: vm: " Igor Stoppa
2018-08-30 22:57   ` Dmitry Safonov
2018-08-30 23:04     ` Dmitry Safonov
2018-08-31 21:25       ` Igor Stoppa
2018-08-30 22:34 ` [PATCH 06/23] virtio: add unlikely() to WARN_ON_ONCE() Igor Stoppa
2018-08-30 22:34 ` [PATCH 07/23] seccomp: remove unnecessary unlikely() Igor Stoppa
2018-09-02 21:26   ` Kees Cook
2018-08-30 22:34 ` Igor Stoppa [this message]
2018-08-30 22:34 ` [PATCH 09/23] cpufreq: " Igor Stoppa
2018-08-30 22:34 ` [PATCH 10/23] wireless: " Igor Stoppa
2018-08-31  9:52   ` Kalle Valo
2018-08-31 13:44     ` Igor Stoppa
2018-08-30 22:34 ` [PATCH 11/23] " Igor Stoppa
2018-08-30 22:34 ` [PATCH 12/23] " Igor Stoppa
2018-08-30 22:34 ` [PATCH 13/23] freescale: ethernet: " Igor Stoppa
2018-08-30 22:34 ` [PATCH 14/23] wimax: i2400m: " Igor Stoppa
2018-08-30 22:34 ` [PATCH 15/23] lvm: device mapper: " Igor Stoppa
2018-08-30 22:34 ` [PATCH 16/23] " Igor Stoppa
2018-08-30 22:34 ` [PATCH 17/23] usb: octeon-hcd: " Igor Stoppa
2018-08-30 22:34 ` [PATCH 18/23] infiniband: scsi: " Igor Stoppa
2018-08-30 22:53   ` Bart Van Assche
2018-08-30 22:34 ` [PATCH 19/23] pinctrl: " Igor Stoppa
2018-08-31  9:29   ` Linus Walleij
2018-08-30 22:34 ` [PATCH 20/23] mm: percpu: " Igor Stoppa
2018-08-31  1:58   ` Dennis Zhou
2018-08-30 22:34 ` [PATCH 21/23] filesystems: " Igor Stoppa
2018-08-30 22:34 ` [PATCH 22/23] powerpc: " Igor Stoppa
2018-08-30 22:34 ` [PATCH 23/23] scsi: " Igor Stoppa
2018-08-31 14:09 ` [PATCH 00/23] Make use of unlikely() more consistently Arnd Bergmann
2018-08-31 20:35   ` Igor Stoppa

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=20180830223429.30051-9-igor.stoppa@huawei.com \
    --to=igor.stoppa@gmail.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=igor.stoppa@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=sviau@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®