Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2505571ioo; Mon, 23 May 2022 22:12:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo5WAEaXzEJC6CjKDUgMf3gZgPvXrkpUCv0kmBOGYqDIZ3haLGOrQAwbv5Lb5KBVFKLEeM X-Received: by 2002:aa7:de8a:0:b0:42a:b51a:554c with SMTP id j10-20020aa7de8a000000b0042ab51a554cmr27770958edv.318.1653369125729; Mon, 23 May 2022 22:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653369125; cv=none; d=google.com; s=arc-20160816; b=q8iRKXCGawtlCMNVbObWGZJfmiWbHNv98lukF0+7YcV/ntep2MWgmIo3jrRnUH2PVU /6npL6vaXdPzSTI/E9mryI37q7QCAcZdoYEGw9MZfMMeR5OtIafTkp65R525aqkBR5xY Em7dWxkr/gQpbsLjYvDX9xIYEkHPnKVA0BXFa+MDYGi38uMsBWSpiTw+VWmZN1TdPn7C mEmb/30doL4WSpOMCu0iOI+v1E7msK9OYTtE/+m7Ns4iH+qbrFl0OyLORxqamyq+fr0c F/Cy5TBkxKVX4frtxFb7e7YQx2EGCeEOGKa1mAUfflygL/XIRpys58l1kacqnE+hQH3n +5CQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Fiz1+9vdtj7iWwDitsWxwbnxzAZWYwGXsUudnEft3R0=; b=Ay295Qsij2hngSCRxet8YhI5WwvgZJanWW6qRsTtzIncZsAh1QFHKbLqNaZMIM4niA rbTPKjBkh/kjcqjO8SM/hviAVXLPknbX80XhwLQRaZXk93uZt9PWhIFIv/JJEryXm+q2 l/FyB5rWV1PXPJxDJy59d4nmiPs1SNwPMEy/XzDfxbW8/LckCkh3Eab8BJPyr0FsGCyY l9+ZuCPwXYU3Mhcrb6RTB1yTM+1tUCZGHG+23z5YMMBiY5kKRhZVrvNmT2nigxz2ixLK SbuZ/jowIxbsEXVmo9CwNZXB4snmPBwYZNaZU1chsVfuOzNfV5KruCEfP9+/ttr1Cl9o 0OKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NNT3O4Ks; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o3-20020a056402438300b0042b6722bcc4si6400813edc.487.2022.05.23.22.11.39; Mon, 23 May 2022 22:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NNT3O4Ks; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230201AbiEWWrR (ORCPT + 99 others); Mon, 23 May 2022 18:47:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbiEWWrR (ORCPT ); Mon, 23 May 2022 18:47:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED6D252B0B; Mon, 23 May 2022 15:47:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 86B726154C; Mon, 23 May 2022 22:47:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B3A3C385A9; Mon, 23 May 2022 22:47:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653346033; bh=dM9xjGcIELwAk7SXfwRMkmck1pzZU48ZxvNuSCmz8to=; h=From:To:Cc:Subject:Date:From; b=NNT3O4KskyBq7fc/YZH4aWnVJknHVxdhCxk8QLMu7cr109aCMGdNOPLSN6TTna3FY 0NHWg5sWrQDIyEMBQokGHB0Y6FVWnzzt14g5Ks9n7SrZVBHbBmV74DuRtAcrrZBFQa WpeSuQ28M29oJlrJh6hu57EfqYCtkCLPnaUm/o0a6/aaeQ7ZE/GAWXtW2Iv2/J5jyF NvSRBm7MLKFohnofWfFWk/5+N9b1kJ+4oUDlDpHll2kX2Hyq2zBF8x4b9sb5No2qmO i0wIfuK8DroytBp3gTZzei6xPv+FSI6n/MLU1TXYKWk5An8KXzQOJ0IRjG1qnBT3G4 5r0zZq146hOEw== From: Nathan Chancellor To: Andy Gross , Bjorn Andersson , Manivannan Sadhasivam , Jassi Brar Cc: Sibi Sankar , Prasad Sodagudi , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Nathan Chancellor Subject: [PATCH] mailbox: qcom-ipcc: Fix -Wunused-function with CONFIG_PM_SLEEP=n Date: Mon, 23 May 2022 15:47:02 -0700 Message-Id: <20220523224702.2002652-1-nathan@kernel.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_PM_SLEEP is not set, there is a warning that qcom_ipcc_pm_resume() is unused: drivers/mailbox/qcom-ipcc.c:258:12: error: 'qcom_ipcc_pm_resume' defined but not used [-Werror=unused-function] 258 | static int qcom_ipcc_pm_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones") reworked the PM_OPS macros to avoid this problem. Use NOIRQ_SYSTEM_SLEEP_PM_OPS directly so that qcom_ipcc_pm_resume() always appears to be used to the compiler, even though it will be dead code eliminated in the !CONFIG_PM_SLEEP case. Fixes: c25f77899753 ("mailbox: qcom-ipcc: Log the pending interrupt during resume") Signed-off-by: Nathan Chancellor --- drivers/mailbox/qcom-ipcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c index 2583b20cdeb7..31d58b7d55fe 100644 --- a/drivers/mailbox/qcom-ipcc.c +++ b/drivers/mailbox/qcom-ipcc.c @@ -344,7 +344,7 @@ static const struct of_device_id qcom_ipcc_of_match[] = { MODULE_DEVICE_TABLE(of, qcom_ipcc_of_match); static const struct dev_pm_ops qcom_ipcc_dev_pm_ops = { - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, qcom_ipcc_pm_resume) + NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, qcom_ipcc_pm_resume) }; static struct platform_driver qcom_ipcc_driver = { base-commit: bca1a1004615efe141fd78f360ecc48c60bc4ad5 -- 2.36.1