Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp726100pxb; Tue, 2 Feb 2021 16:49:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCRgBhflhwMzYdrlLgGQYPr+ed7U/J4TyhIsg5iX1JFOqc1/Z/G2rJUBl+dfhHvo5rG1Pp X-Received: by 2002:a17:906:8507:: with SMTP id i7mr623637ejx.175.1612313396675; Tue, 02 Feb 2021 16:49:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612313396; cv=none; d=google.com; s=arc-20160816; b=tly4fB1GIwht6Z2lKcTdQK/Brqtn6wYdNrtOmGjLKlV6fz15U67L7rICORab3F3zSP gC7+lYMeINQ806rx+Sq9YkGuPkoW8v+E6VhaDD6OHbGkBScI4m8cF5rs5MriJu2Hg88a qZdQ+KgAhe8gZK3yNXK/5/aoeWVk5DrCk2r8Ep3iG+3OgkMDFNenX6YhJs34yrBuE0Og xO+g8fOyeE0WV+uDFtYwCync6T7LviWQC0dwUV9EtlLpCI51gGoN6ydFTJTesLZIRDUL 68rJwCJ4M2sSErruk1T/b2bboF1kVXltCZnZfdGRrS2bqDjT4LPsEy4I02VbABQM0WFb u5vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8OerKKkPor0Indhh6w026Cj/TJ6IJ2132MNhD9kzH+E=; b=kTci0YC+G5CVcyLAMqslgJN4PlKaOuiassqnjRjU2gXqqBey92lrrCN5e8bToolPJd ClK1AhVEQ7qOQjA3L1Ues6i1k3mFYlCs5deZ4z3Ee8hF/fdKjz3YuglvWppZq74+JTC4 klH8vTOgpjXlrsD9iGtZkyOPuMI6W7EMo6Eu/3JMGTn6XXZdmMM7XM8QO1nw+oMVS8Je Ngi8Pbsu1OFaTV0Fhp/1e1N/2AAOG1cWEk4jCQgDteyixIfXH/YBVkRXNGjvdLWsWMd/ ScHdvmk8CCeI83ancOJryfh3FT0NUxlYbhG79J5QsyKWJ/UWbq/xwOzJwJA95WraSeEf IUkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Nf72jfPo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z26si267802edm.375.2021.02.02.16.49.32; Tue, 02 Feb 2021 16:49:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Nf72jfPo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234892AbhBBT7b (ORCPT + 99 others); Tue, 2 Feb 2021 14:59:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:40788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232868AbhBBNtk (ORCPT ); Tue, 2 Feb 2021 08:49:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1079964F51; Tue, 2 Feb 2021 13:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273346; bh=DNUeVOtvpRXsucio8TNJnv82TuZpb/w8BmTtj8IjETc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nf72jfPosnVGngbruETClWVlfb14QjIEAxGnTG3t19yBMRFGPfmfTsFW2SEbCU32d UbJfRjgMZAukWPGrR4ZNmqkuD25XED6HZqEUk+h++Y7J+jgUJ4E61eEaJ0acVfND/b 1DAR5VLwS3eFbPJWjJgE6Ih4uek9qlavWo2CpHF8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Stephen Boyd Subject: [PATCH 5.10 071/142] clk: mmp2: fix build without CONFIG_PM Date: Tue, 2 Feb 2021 14:37:14 +0100 Message-Id: <20210202133000.653587661@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit c361c5a6c559d1e0a2717abe9162a71aa602954f upstream. pm_clk_suspend()/pm_clk_resume() are defined as NULL pointers rather than empty inline stubs without CONFIG_PM: drivers/clk/mmp/clk-audio.c:402:16: error: called object type 'void *' is not a function or function pointer pm_clk_suspend(dev); drivers/clk/mmp/clk-audio.c:411:15: error: called object type 'void *' is not a function or function pointer pm_clk_resume(dev); I tried redefining the helper functions, but that caused additional problems. This is the simple solution of replacing the __maybe_unused trick with an #ifdef. Fixes: 725262d29139 ("clk: mmp2: Add audio clock controller driver") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210103135503.3668784-1-arnd@kernel.org Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/clk/mmp/clk-audio.c b/drivers/clk/mmp/clk-audio.c index eea69d498bd2..7aa7f4a9564f 100644 --- a/drivers/clk/mmp/clk-audio.c +++ b/drivers/clk/mmp/clk-audio.c @@ -392,7 +392,8 @@ static int mmp2_audio_clk_remove(struct platform_device *pdev) return 0; } -static int __maybe_unused mmp2_audio_clk_suspend(struct device *dev) +#ifdef CONFIG_PM +static int mmp2_audio_clk_suspend(struct device *dev) { struct mmp2_audio_clk *priv = dev_get_drvdata(dev); @@ -404,7 +405,7 @@ static int __maybe_unused mmp2_audio_clk_suspend(struct device *dev) return 0; } -static int __maybe_unused mmp2_audio_clk_resume(struct device *dev) +static int mmp2_audio_clk_resume(struct device *dev) { struct mmp2_audio_clk *priv = dev_get_drvdata(dev); @@ -415,6 +416,7 @@ static int __maybe_unused mmp2_audio_clk_resume(struct device *dev) return 0; } +#endif static const struct dev_pm_ops mmp2_audio_clk_pm_ops = { SET_RUNTIME_PM_OPS(mmp2_audio_clk_suspend, mmp2_audio_clk_resume, NULL)