From patchwork Fri Jan 15 07:40:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 12021789 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D86A0C433DB for ; Fri, 15 Jan 2021 07:43:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81B0F23436 for ; Fri, 15 Jan 2021 07:43:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81B0F23436 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:MIME-Version:Message-Id:Date:Subject: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=QNDiVpKTFUR7WYvCbZncypEm3JB131+jw/PvTSrAVaM=; b=TWgmKiSdcr+Oi8/3eODLksfGng yNHCqsDtqE9Y1juVAqgxvEgxY927v7cb0FFShG5Wu31SKAAAKZQrE2E7aFAFiL3J5Dw+dg0pKRuO6 e8tzZ4V/nuRteLsaP0fOrd0cKxZRvYatlXJZU/oVOFPokiYyM+3zl7jPSGz8OtSICv4SHtoOnu9uX QCAAYXIWuc3tW5q+3cU1AU2kzwvhpuVKb5gznyv+tpkYSiqwDcf3apTe95DuKvmewRyK3TrFlHENJ A2ukA+p2ADDilMAKfBbolbGc606yvAqVTXc7Ls8TNVvua6W6BbD6pEZReB0nj5n6HWMYUMu9QeqZo BBh0cQjw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0Jjv-0001vt-68; Fri, 15 Jan 2021 07:41:47 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0Jjr-0001un-KF for linux-arm-kernel@lists.infradead.org; Fri, 15 Jan 2021 07:41:44 +0000 Received: by mail-pj1-x1033.google.com with SMTP id w1so5843879pjc.0 for ; Thu, 14 Jan 2021 23:41:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=subject:date:message-id:mime-version:content-transfer-encoding:cc :from:to; bh=O+ju7GzUSXgEyONqw2hDG3TWhp+lRUaB6LNMrBnInUE=; b=c4aQ4cyO+IgwfmpdLIqX1q419sayYIGKJD7IUTfQz/7f8CHhBNqAF3Wzrjya7/P7hH TxL/eVFXPOVDkVf5wwZ7v4kMLifmKRHFlyLUHIGST1zgiVGMHkR4hNYOkf4lveAhA0oS 1JhKVacOoCfPS5nlfV+CbFh2UMrIOLz53NDcGWOpf0HOehUB3NoZjDItyhGiAit5SYUA htG0JawNAtwSzaVx015CNsEZEjiDBl98T+2wbYYjqRGUd5LgPSdeAVGnCAz3lL9uOC12 8ABg0muchJyr4U4WR8mCRraOsIinPmYPLeoNSV/pmoNU0DQDIiI2WD4AIRmyA6QaSdUH eMDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:mime-version :content-transfer-encoding:cc:from:to; bh=O+ju7GzUSXgEyONqw2hDG3TWhp+lRUaB6LNMrBnInUE=; b=IR8BXi0rMZEbnj8yBZUYjl05PDtMfRSl1ZskPL0/le5kNWhJ13NYoOXQUXNe1APEuZ aa1VFYhgk3j6cras7vtLAIVkqcTUmVmhLsURl5owTsXgOL+8wJsIK+hm6VJy2BxGKAe+ O1jESz8Opi81oYFiz8XxKDa8Izms8p469OT4zFtvOFNlm1dVvtm5e14aVOoimB/zDWWT 6WSeRiE6fbKLa+Hvwsp3+44mNjByM4ZJC6iB+kEGSIwX/vsITSwmWWfttmwE3kfTTeTX DnAeeKfj87OStZnaFcJW6lsiXpPjm/CLe3dEuwHjdKBn8KVQYvX/sRac9wcsLDeFXDdF P8LA== X-Gm-Message-State: AOAM533D0zJKu95l/j/+D5Uq5VMEtKS3O9w2quaTcq5tI65LBbE5rSyZ 5C3EOMrU6IWvA5ld/xWcJLzIYiNUAvfLGA== X-Google-Smtp-Source: ABdhPJwsuvXD5qgp029828wqLpR1cX2SOM/CqGlwkz97B2cHjqrKqUR1XAm+Epc/0bMXU0qByl31WQ== X-Received: by 2002:a17:902:a412:b029:db:cf5a:8427 with SMTP id p18-20020a170902a412b02900dbcf5a8427mr11747670plq.48.1610696499826; Thu, 14 Jan 2021 23:41:39 -0800 (PST) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id 4sm7656692pjn.14.2021.01.14.23.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 23:41:39 -0800 (PST) Subject: [PATCH] drm/rockchip: cdn-dp-core: Fix cdn_dp_resume unused warning Date: Thu, 14 Jan 2021 23:40:43 -0800 Message-Id: <20210115074043.2944-1-palmer@dabbelt.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 From: Palmer Dabbelt To: heiko@sntech.de X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210115_024143_810699_9558EF17 X-CRM114-Status: GOOD ( 14.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, Palmer Dabbelt , hjc@rock-chips.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, daniel@ffwll.ch, kernel-team@android.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Palmer Dabbelt cdn_dp_resume is only used under PM_SLEEP, and now that it's static an unused function warning is triggered undner !PM_SLEEP. This conditionally enables the function to avoid the warning. Fixes: 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static") Signed-off-by: Palmer Dabbelt Acked-by: Randy Dunlap # build-tested --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index a4a45daf93f2..063a60d213ba 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -1121,6 +1121,7 @@ static int cdn_dp_suspend(struct device *dev) return ret; } +#ifdef CONFIG_PM_SLEEP static int cdn_dp_resume(struct device *dev) { struct cdn_dp_device *dp = dev_get_drvdata(dev); @@ -1133,6 +1134,7 @@ static int cdn_dp_resume(struct device *dev) return 0; } +#endif static int cdn_dp_probe(struct platform_device *pdev) {