Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2567298ybl; Thu, 29 Aug 2019 09:52:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyk+WmK1hkiWrgkH+ZpigpomEZs6V7oxH3VUgEoRmismw+prZd14q6DjBJ7arCoJPYCzpAo X-Received: by 2002:a17:90a:23c5:: with SMTP id g63mr10841532pje.124.1567097543933; Thu, 29 Aug 2019 09:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567097543; cv=none; d=google.com; s=arc-20160816; b=ViEg2elwrzOLGtx9qlv4Fxzp38hLXmW4yZM6WuRZ+hMFIVsAPhck+xSsDevgezbVoL BTpNj6zP3IZZISuCpSneu/zXxX1L8AAFXUNtyGn31SFkBClWOr9CEIXBFszuYCu/5Cej 1xCU46EuYNBPB16DDGZevsTfr6ZFByDTdMymv1EeQNbggBBjNs8vUtLttReOIODEhmUL 6/M4R5ZHY4wPfg8rveQYWQkLYWQd6gHDByZ4CQnbndnUA43zgELG5KzNqTZJTaLritKk 18TXtDcqWS6fqvjFD1Jq+ReTmUZ4YuGKm7g1ZwoEYJhza5ZNy12QnEK5gHyjlKHbzq3C TZMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=00lufN6/yFhKzY8yCZ1Zaqb6ynWRRTw3i9KZWm+zVP8=; b=TLawW59j8NKi33K69MymZU2bUM01MR5x5DqvpcCxHbfa3sunqJyjlWbIoxhdtAWShC b6Gapu8eu7rM0My40ysL/78uGugZLpqpjZH70UIA2jLKvWNA8MEIaRn4ekVZIt1iz7Fx s9+yKhfQ1zBTUwjI2VZn3pTyP4la7Qn01L3a81tshbFIYYI+NUsfjPZbL1lxOjSxqD71 JqWiNbqsvK6k+kBpuFlawFCdRsD3oC6rMkm8BzHbI41GKl53H0QCw6tE+RaujBwp/ZQj lFEbWvBFRMtWJkEgbTv9n9ID1+PnkdeIWzgPSwl09pYuyWptFc18Owa0XzS2rQV7kfEX jfYw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si2455378pgp.181.2019.08.29.09.52.08; Thu, 29 Aug 2019 09:52:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727834AbfH2QvE (ORCPT + 99 others); Thu, 29 Aug 2019 12:51:04 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41225 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbfH2QvD (ORCPT ); Thu, 29 Aug 2019 12:51:03 -0400 Received: by mail-wr1-f67.google.com with SMTP id j16so4142344wrr.8; Thu, 29 Aug 2019 09:51:01 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=00lufN6/yFhKzY8yCZ1Zaqb6ynWRRTw3i9KZWm+zVP8=; b=E2qga6MNpOWB1suPx/dJQ2joS9HN2DV3ByjIAFh9U0ImDr24pUDSqrbMMNQCFfKnik +fS5wijei9QlCpT06019cOW+3Fjkt2Pwvip+15ddu0hLucrwh4hyxPlijH40EItvAzW5 b16+f+8FrskE9C0zg0gI/XY9q/pfuu1m7Z6cIxfyiP+NlYzFEYeO/LGkaGVsYN9TL9E9 E3FNtEbpF41RmS3/CXqYNreE7K3/zG6Q3iwmRTVzo5nxOToZZk+VmLg64aOYDnVNcadu 2R48oNKIC5gYb7QtUM5/Q4rNanulJ6S45EfThH2I7/TuoOdI6CVO8Qhk23Min7u96CBG RM9A== X-Gm-Message-State: APjAAAUHv+QlYO1jizub1iZZ2WxstWh01vB+JENmVX5ZnE4GsqMmq6DA seLc3PAYc+qjipyvATGHRySejp75 X-Received: by 2002:a5d:6a45:: with SMTP id t5mr10701889wrw.228.1567097460777; Thu, 29 Aug 2019 09:51:00 -0700 (PDT) Received: from green.intra.ispras.ru (bran.ispras.ru. [83.149.199.196]) by smtp.googlemail.com with ESMTPSA id o14sm8340770wrg.64.2019.08.29.09.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 09:51:00 -0700 (PDT) From: Denis Efremov To: linux-kernel@vger.kernel.org Cc: Denis Efremov , Rob Clark , Sean Paul , Joe Perches , Andrew Morton , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 02/11] drm/msm: remove unlikely() from WARN_ON() conditions Date: Thu, 29 Aug 2019 19:50:16 +0300 Message-Id: <20190829165025.15750-2-efremov@linux.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190829165025.15750-1-efremov@linux.com> References: <20190829165025.15750-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "unlikely(WARN_ON(x))" is excessive. WARN_ON() already uses unlikely() internally. Signed-off-by: Denis Efremov Cc: Rob Clark Cc: Sean Paul Cc: Joe Perches Cc: Andrew Morton Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.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 4804cf40de14..030279d7b64b 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c @@ -253,7 +253,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)) { DRM_DEV_ERROR(ctl_mgr->dev->dev, "CTL %d cannot find LM", ctl->id); return -EINVAL; @@ -695,7 +695,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)) { DRM_DEV_ERROR(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 8afb0f9c04bb..5495d8b3f5b9 100644 --- a/drivers/gpu/drm/msm/disp/mdp_format.c +++ b/drivers/gpu/drm/msm/disp/mdp_format.c @@ -174,7 +174,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.21.0