From patchwork Thu Sep 20 16:49:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Wang X-Patchwork-Id: 10608217 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF582913 for ; Thu, 20 Sep 2018 16:49:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFA4B2E179 for ; Thu, 20 Sep 2018 16:49:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3AFC2E1A7; Thu, 20 Sep 2018 16:49:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 748DF2E179 for ; Thu, 20 Sep 2018 16:49:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731254AbeITWd7 (ORCPT ); Thu, 20 Sep 2018 18:33:59 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:40984 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730936AbeITWd7 (ORCPT ); Thu, 20 Sep 2018 18:33:59 -0400 Received: by mail-yb1-f193.google.com with SMTP id v10-v6so4197780ybm.8 for ; Thu, 20 Sep 2018 09:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IUXIEoKfgNQGOnNnQgVGyJR1PRiFGJHB2anR2XX0Cxo=; b=m76/Hr4jZ8aiwBm8J2ZgFiLCC1OiquQ7nfGxCY44CbcQy4AuQK9clRYsWcuvSXIUna N+nyv435yRqBGbxkibLfHNWa9l2Hd++j5X7kjzGcvO3UUSmpG9krt0BRXo9DVWdM9VbH Wstzv1FwxCjeWAjFeRXxdegXfAbX/q5pVpHOM= 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=IUXIEoKfgNQGOnNnQgVGyJR1PRiFGJHB2anR2XX0Cxo=; b=MYlA79my1Nuu0XSm2wFAnlR2YZ6GQXsMOIdnpmKoWjylH+asVE8F1M5aNR6XjISEF4 m3mmcpTlwwe9TwGAkw0FJKuBUdWMrmkTzP+bPoujj/jWjY6oaJa63EJejHnO+1p0P59D gUhf5klrrYu8bYH58cqtlVyibKKt8CpNySa6CTt/sI4T94nMy79xMT2l1pv4moPBn1aZ kFYtXyo5bKMxu+bSYcZNFBV2HEYn2H+HW5i5t8lWYbV8lFsUJfBk/34OgAvPkrS9htKE vL76d8pg3kt5uHnxAD6sCTR4PwEwfuliJu2HWTuW8gsNA+8T2rtXub9uKQoCuAAVLezi Wp4w== X-Gm-Message-State: APzg51AKovHkR5iocyh3N2bK0nS3dG+lGiA+SSXSMgo6q1pNbpk6nJSe 40QDtNWznsfvTEUF795xwfqV+K1qW5U= X-Google-Smtp-Source: ANB0VdZLdTm+iOnNq/+yvOiPFG9cNPyxbkC2lYkHaw4B2Z5pKZk5Nyum7spqVM4o6jaTdPvMP+zSeg== X-Received: by 2002:a25:e5c3:: with SMTP id c186-v6mr18192243ybh.209.1537462176883; Thu, 20 Sep 2018 09:49:36 -0700 (PDT) Received: from bzwang.cnc.corp.google.com ([2620:0:1013:11:6f9e:dcbe:41ef:a61]) by smtp.gmail.com with ESMTPSA id e126-v6sm6332688ywf.72.2018.09.20.09.49.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 09:49:35 -0700 (PDT) From: Bruce Wang To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: seanpaul@chromium.org, jsanka@codeaurora.org, robdclark@gmail.com, abhinavk@codeaurora.org Subject: [PATCH v2 6/7] drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void Date: Thu, 20 Sep 2018 12:49:23 -0400 Message-Id: <20180920164924.225847-7-bzwang@chromium.org> X-Mailer: git-send-email 2.19.0.444.g18242da7ef-goog In-Reply-To: <20180920164924.225847-1-bzwang@chromium.org> References: <20180920164924.225847-1-bzwang@chromium.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Removed all impossible checks from the function, which eliminates the need for a return value. This function is also never used outside of dpu_plane.c, so the function is made static. Signed-off-by: Bruce Wang Reviewed-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 27 +++++------------------ 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index 9a5d5afa53f2..f9e65acdf87e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -363,35 +363,18 @@ static void _dpu_plane_set_qos_ctrl(struct drm_plane *plane, &pdpu->pipe_qos_cfg); } -int dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) +static void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) { - struct dpu_plane *pdpu; - struct msm_drm_private *priv; - struct dpu_kms *dpu_kms; - - if (!plane || !plane->dev) { - DPU_ERROR("invalid arguments\n"); - return -EINVAL; - } - - priv = plane->dev->dev_private; - if (!priv || !priv->kms) { - DPU_ERROR("invalid KMS reference\n"); - return -EINVAL; - } - - dpu_kms = to_dpu_kms(priv->kms); - pdpu = to_dpu_plane(plane); + struct dpu_plane *pdpu = to_dpu_plane(plane); + struct msm_drm_private *priv = plane->dev->dev_private; + struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms); if (!pdpu->is_rt_pipe) - goto end; + return; pm_runtime_get_sync(&dpu_kms->pdev->dev); _dpu_plane_set_qos_ctrl(plane, enable, DPU_PLANE_QOS_PANIC_CTRL); pm_runtime_put_sync(&dpu_kms->pdev->dev); - -end: - return 0; } /**