From patchwork Mon Sep 6 19:49:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 12477323 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.1 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,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 4889EC433FE for ; Mon, 6 Sep 2021 19:54:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1984061050 for ; Mon, 6 Sep 2021 19:54:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1984061050 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Cc: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=crlbwTppx93UTj+F2LPJ7NG6ik5605uHDLsB7mO94+k=; b=RRR6b6fbhMxsM6 vkPYTql1MCGKh6F4/2pLqRNHVBzYVWNozG0ijfWnVkUJjj+09ozLLK7SXvZOZWwjdOns2aGcFiG99 aItWFPbnyIv50jOgG3+UHZy7uuEmohKhJTYEYrX0zzOPMdP7zHx1rmP3QgxtFutYRlwvKibe2qAM8 utTLAFYixZbk+4PTcuNbW6SKQOAEKTuYs59gVTvGXHq4QMKCwY2RBlR0qpPv4/Wjmg8N9mRR4ER0t RsUmjkaKeQiGVUTt23xVDKymwwrE5TSSSCVP96XjvQKgfS0NMFpWSj9mzO9EV1z+G2xY5Z2TE7xpC d4n8hYzvNF0URkzUR4Gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mNKf7-001oth-1f; Mon, 06 Sep 2021 19:52:13 +0000 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mNKf1-001osi-WB for linux-arm-kernel@lists.infradead.org; Mon, 06 Sep 2021 19:52:09 +0000 Received: by mail-qv1-xf33.google.com with SMTP id ew6so4525665qvb.5 for ; Mon, 06 Sep 2021 12:52:06 -0700 (PDT) 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=/HWCAki5G+lVbiHxWhcyDiqEfC+VEd9DkU7YY2YmJIE=; b=mEMfKCujdhFTd1UNMLYapbDASirmCMlcWBmAG+ICS1uHk9R14HJqkGrlQUPsRRI25u P0Zdf7eVspSFnAUulxZHC+nvRVxMvW//gGUBb8CUDuNmC2IFXxxn4vvlJ4V7z+doCXGg vlSfvWDj58XD4pjDO+DUegyIt4r6BzyrwM+K4+zeQYwEZCIqNuVJ4NuAX8dsujwTTabb kBNFqmzIhkNJK4n5NBMhrYpZovE4ssULYobKDasABMNlf/QYd3Eg3jurWNGYB55wd8H3 yhAgSIZarxCVlXOwMuS9r5YRoNF8jqkbXRTKaQ3kQa+ZKGBUEnuYQ1rCcS/LoRLe7gxB Xfbw== 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=/HWCAki5G+lVbiHxWhcyDiqEfC+VEd9DkU7YY2YmJIE=; b=H2zxQ+/87T32NEpCzP5eUYE6+2KSG9lELe2DDnUtvwfTcpwBR8kWpctPiOtdcOtbCH JVJ+TgWJX/C+Wu8KbvKSjvrAkdalCspX1KLCQBhaYKTVGrJNVXFO6+7R4i2UR8d4R9nk fqMkuQHygFNGI2O2HhgOj6TxUlmeg5bKglT/Bf49mRGLw42QYnQIwlWipFUl8/pdYha8 Is4hS+W2/8EnhZ8KRkh6qO7NILrbqcfEBcgtF/SFfoeGkxr+OoolP/NC8trtEg6cNokt MgDmQc5yOxEouwzA5VbAZlQDVacjQC5IxuoqPF4dFnbT+nsH+cdOBZRJp7q3Z77zszQ9 wu1w== X-Gm-Message-State: AOAM532X83BB8+7TbCO8Lflwhu/Nb6bfz4gU/SLUtvZoPCNxpxkTBRbV f2KHtDOpB5xm7V8uHw7ucR5liWgdPLkDU5it X-Google-Smtp-Source: ABdhPJxkMdyPqihtMbecIkVh3QvlQZ6CM5K9jNcXKt6Os+i9+qJJSTCujwN5BKXl3Q+du82VzB6IjA== X-Received: by 2002:a0c:b293:: with SMTP id r19mr6066662qve.19.1630957925669; Mon, 06 Sep 2021 12:52:05 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id m5sm7280699qkn.33.2021.09.06.12.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 12:52:04 -0700 (PDT) Subject: [PATCH RESEND] drm/rockchip: cdn-dp-core: Fix cdn_dp_resume unused warning Date: Mon, 6 Sep 2021 12:49:18 -0700 Message-Id: <20210906194917.376116-1-palmer@dabbelt.com> X-Mailer: git-send-email 2.33.0.153.gba50c8fa24-goog MIME-Version: 1.0 Cc: airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com, Palmer Dabbelt From: Palmer Dabbelt To: hjc@rock-chips.com, heiko@sntech.de X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210906_125208_148377_6E5554B5 X-CRM114-Status: GOOD ( 15.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Reviewed-by: Geert Uytterhoeven --- I sent this one out in January, but it looks like it got lost in the shuffle. I'm getting this on a RISC-V allmodconfig now. --- 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 8ab3247dbc4a..bee0f2d2a9be 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -1123,6 +1123,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); @@ -1135,6 +1136,7 @@ static int cdn_dp_resume(struct device *dev) return 0; } +#endif static int cdn_dp_probe(struct platform_device *pdev) {