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: 12021787 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 4969FC433DB for ; Fri, 15 Jan 2021 07:41:52 +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 709FB23436 for ; Fri, 15 Jan 2021 07:41:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 709FB23436 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-rockchip-bounces+linux-rockchip=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=RAgePS6Ljo6YHcXvQ+xOaxkKXuKNHxniz9LWGKRIpx4=; b=ieP2It03ddtrjuyeTbX0DdGzMm yUU1o94pzLNPZvafEsDmUAenJoEgZol9+aCojRmtCZX82lAnssDqWN+4LGwXmTbd6l8ZUW8GKbjYm ZRWhIJGwDxPozjbbxUvZH0SRsw3nO6OVgGt7QpX2ugLkCnpUhuIi3bRwuPgQyDyiyoBp/9/OPTUcM vK01sXcJnASyGS5wdRsy/FKXzU43TPq7dbD7IlJKpSPekbTFtKMbC9xaSWzjQnbNfIdR26LaRft8X huHGuzUf6XXqYdqdQGlBh3eeHGfb7dhjuDOhaDY0ttOIlrHo5dvBVlJY/FU9LXx93YH5Wthi5n9sj PUbNZ19g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0Jju-0001vk-C0; Fri, 15 Jan 2021 07:41:46 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0Jjr-0001um-Ir for linux-rockchip@lists.infradead.org; Fri, 15 Jan 2021 07:41:44 +0000 Received: by mail-pl1-x62a.google.com with SMTP id t6so4286071plq.1 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=sjONGOf4rKuYYQGu/4YVdfNK8ejOmkcbKRe39NoGNLMWfABT7KZ245OD56n3jvBFCQ tMudy3G8L270338I5x7S3RVEsec8Q6b1ZiciVMIx4og9tzRPD8R+lF5UEYq02SCmj/63 6ufgm3l1eciLWTqua4PAVTs0M2IFGsL4k/G0cw3vN1hHhsB43XRv3926euGJGEguTUrg PRlbSLxRBGdNLWv3ii4sLBd0I8l04ZVZ1g8CamI+Ai0FHkNtwIQunmWmHQDWETR8jEA5 RLm0IdJV5ddwp8q9dmroVN1+7y6RdJoeCVj4fk0z5KIehpvrdZp6qYuMZ6JpD1GI3MnQ djPQ== X-Gm-Message-State: AOAM531nOgwBVlvhAnY0g7V1JylGIRkLAE+6WUzQwrDuKn1boP4UBgZx eQ2iiKBKTekMqGzZKgDSnbA7lQ== 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_809550_5FBCEAF1 X-CRM114-Status: GOOD ( 12.69 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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) {