Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp55939imm; Thu, 30 Aug 2018 15:37:37 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbsfug3ITzuJ+UAxNYhpXtITZbxiRA9OZJXcDTIOV+qfJQD45HJhPrREy3BdQgXjIykNE8I X-Received: by 2002:a17:902:b702:: with SMTP id d2-v6mr12481457pls.12.1535668657545; Thu, 30 Aug 2018 15:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535668657; cv=none; d=google.com; s=arc-20160816; b=f1Ly9upyxchLMqwvL8FuRrv2DRCy7cVNujw26fYcawoMV48GDGGmigiZOjyfcRzZNA ANoxNq4eYk1FGCKoOpK7KwWoUMSJDwA99S73pxBssyMbSJeYcvo7UsDJp/x0pkqIBzic o3PFrRXUqldi6SWw+U/kMSQP7jHTgyqMZnem2qkW1aMPNLjsahhflX1nkJ0pzC2Z/KEq tUShlnAxi0TOthL5bH7sm/C0LbBfDd/LR9qcAQxSS8nIQOkdnPWWak3wPK9NqqSFjMxU 3kp45Y/lGBJunZobdwtpu6igm1mBhpHpyHGkT8YQViKd6V6mmlDgqRtOWQHFrMp45ii/ ctfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=q0zmoBAJ0A3Gx+YDb/TCVvHPQO/4qNnwcFIHAZAkEU8=; b=uHJPZKjasz6AOqJBrqxLd2BjlhJAF2UmsElgOKr2Uheck6s+Gck0eCLgfzaHyqMW3p 830eUMYsqT+YRfTcDMQXj0TdSDaMw2/TR5btCJPFS5/y4iZV5I3pKKXJ66lqt4tuk3+H 4KZrDt+sKJ7HFR7nferCc3BOp8JryFfw8L/raBe2rotb+jKxcHjFJpYKuxuagTo+oCKv 2VG0YyYcXM+ATIW3+ToB2WNBx3saCL3ky1u8VaeMU5gujQz+066XuL9M5CbaVDCCBcCW kE6Lx5fYHa53eYdUdqc2/SHCpmKqDDZyCSiU5UakjPPbpweQ7IVahPRNm2mp0RKil2KS vOTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OR7BZzaf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 137-v6si8106961pfx.155.2018.08.30.15.37.22; Thu, 30 Aug 2018 15:37:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OR7BZzaf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727542AbeHaCj7 (ORCPT + 99 others); Thu, 30 Aug 2018 22:39:59 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:34527 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727212AbeHaCj6 (ORCPT ); Thu, 30 Aug 2018 22:39:58 -0400 Received: by mail-lj1-f193.google.com with SMTP id f8-v6so8571783ljk.1 for ; Thu, 30 Aug 2018 15:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=q0zmoBAJ0A3Gx+YDb/TCVvHPQO/4qNnwcFIHAZAkEU8=; b=OR7BZzafNnLLto3lJdy5xe5PU6VTD9B7TO9EpDT9MbX2KuobLTEXSyVChvIl6/AdZx f9JQcXOpaOjf+oWD9blFisRzzTpFhaYnMe3V1ooRFNpfWhc01m/DTmJ02tZnEjNAfv1M ua6120YRi4CxUF1an8OXoYaXHFOUEEbzBDlwZngljRzq7u7NJCG8VU9+WTGyBI9kfV10 JwWex8O38lCBkqlzw5nJlhKqvdHKTzxKg8Y7s1oZU4MYEUhOdbwgA+IGEzkFdPjRlIlh GEV8QUkScJSBTsL7ZY28+vYkFpW861hfMETQGovW3rmACm4IxuETjw5+md4qrJ0jq9dI eR4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=q0zmoBAJ0A3Gx+YDb/TCVvHPQO/4qNnwcFIHAZAkEU8=; b=RdUj7kt7rnnnEp1GMUCxIK8ZeDh7oioAPEN2o+qfbAOiRLqzvvP+E2FPGNAJYYD0kY IUpg8qRH26jBHNn0ZpIez3VsqRG5RuIHS9Is36nKs5/qQEiWTyAK2nvlXe+8nGNBEuag PRJKlOkbJSukikYbFot6E42m9J1dXA0eR0YXyyuH+Tm/0qJbv10m90wljlD5AQg212mX MsbGBv5ai0vzwxp3KVZPLnOaK8rEkjtCORFiOr41EMQpINWgyS2xQO/wVPKLFLQJia87 UTHduznf5Ah6P+jxzz4c72D9XggGDYJL/cLaPYE0YGTW6kCA8kAlzavuhYdAZPCVecwH Nqfg== X-Gm-Message-State: APzg51Dm3Ld8YkCzr1sooCb/1U3OqdqolY04uEDAc2WwmrOnr3HVOsKl 3CbKNOzGP+9690SbeWx6QS1v65Nkl6s= X-Received: by 2002:a2e:2bd3:: with SMTP id r80-v6mr8924447ljr.57.1535668532707; Thu, 30 Aug 2018 15:35:32 -0700 (PDT) Received: from Mort.jumbo.freeair (91-159-62-202.elisa-laajakaista.fi. [91.159.62.202]) by smtp.gmail.com with ESMTPSA id u28-v6sm1455376ljd.61.2018.08.30.15.35.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 15:35:32 -0700 (PDT) From: Igor Stoppa X-Google-Original-From: Igor Stoppa To: linux-kernel@vger.kernel.org Cc: igor.stoppa@gmail.com, Igor Stoppa , Rob Clark , David Airlie , Archit Taneja , Stephane Viau Subject: [PATCH 08/23] drm: remove unnecessary unlikely() Date: Fri, 31 Aug 2018 01:34:14 +0300 Message-Id: <20180830223429.30051-9-igor.stoppa@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180830223429.30051-1-igor.stoppa@huawei.com> References: <20180830223429.30051-1-igor.stoppa@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Cc: Rob Clark Cc: David Airlie Cc: Archit Taneja Cc: Stephane Viau --- 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