Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2827409ioo; Tue, 24 May 2022 06:55:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVa5VtnvBeJKzJwYMrcYNw8EjFt/muJqkfG7FCc0W4HY/Tb3kpIPnUUdDaVCT+Ew2zWbnh X-Received: by 2002:a17:903:234d:b0:161:994f:f850 with SMTP id c13-20020a170903234d00b00161994ff850mr27289289plh.47.1653400521777; Tue, 24 May 2022 06:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653400521; cv=none; d=google.com; s=arc-20160816; b=LunEVS3hM21ck5ibhWWmODw03RTTgL3QG/VDsPuSYqu/a0WoZXzQXFdlSauSkTytwQ asUG1wY07azmqVYi25VkqeQ3R0S2Ay7qGYcd8kBOLRFcECA2UJxOPk9ki9nx+VjXc8UQ 76ujhvdbFbeUO0q0b1+4T/+LsqI1shlPphPScVJ3E39PM69xC4hNcWaN5Os8Jt9E3237 7bLtlQ62lxpOB2uPWhDU7NQtsLYjEvJsqHgLsFOnomnfVMBT+GClKSasBv/Q3NoW3Bhb Xk1jvJVPfQzZPdO8a+vL/56ezSaNxfjlOqmtqyOp5Zuj6+BpYk21jemymEBhfpknGXun Jzow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=YogcLhioZD8mO8o2z+SR0UJW63uOHaQtqSiO2gDX0Wk=; b=BghXArabTF9SZbyG/vXXz74tmOMXSvT5mgfLZCCGVcz9lstPyAzmIhtL5uUnKMhGTw 2pNm8YeIPUvsY6+vv5PmlHC2lKX9NlmplbRfFfKFwYe+qimSjgmXQbrJbdOC2xgNh2A6 ba5DMnSQfQXi8uNdF3wCOjh3nqu8O/0TOwTJ5lFE0WZxqJ8VfdphAbWbZBr73FTpyIyy AlaKqI6hrKvQXmHBi9p/IwySFlZc0/OjyJcAs6rYliD+CF5+yW6HPi6myXMi7M8pJOaf Ux6cJM8C5h85o6trBLDIx3ImU4xqwkpgyNGvAiJHjKlk2B6b7KL1RemXuEMMCOUlowZi cuzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=uyqbWXSi; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p17-20020a170902a41100b00156bddf0f3csi3330646plq.53.2022.05.24.06.55.07; Tue, 24 May 2022 06:55:21 -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=@quicinc.com header.s=qcdkim header.b=uyqbWXSi; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235121AbiEXKPX (ORCPT + 99 others); Tue, 24 May 2022 06:15:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236083AbiEXKPK (ORCPT ); Tue, 24 May 2022 06:15:10 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48EF18723D; Tue, 24 May 2022 03:15:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1653387308; x=1684923308; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=YogcLhioZD8mO8o2z+SR0UJW63uOHaQtqSiO2gDX0Wk=; b=uyqbWXSita2DFnjfBxfuJxEkDu2Rs0NaR8Lq4Ej48jqSxW6tL3TDFqnh Mm2JZi1o96wcnAPNGm0ADUjS1xzaxze4GnGae4bzwxFZutuPxiEbbJQg3 PpjaCaIpSdGAAYoDU7cUfOqoQ+hv+Jo/Cnpr56uzAjiLNw1kS/5Qv/pdp k=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 24 May 2022 03:15:08 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 03:15:07 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 24 May 2022 03:15:07 -0700 Received: from [10.79.43.230] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 24 May 2022 03:15:02 -0700 Subject: Re: [PATCH] mailbox: qcom-ipcc: Fix -Wunused-function with CONFIG_PM_SLEEP=n To: Nathan Chancellor , Andy Gross , Bjorn Andersson , Manivannan Sadhasivam , Jassi Brar CC: Prasad Sodagudi , , , References: <20220523224702.2002652-1-nathan@kernel.org> From: Sibi Sankar Message-ID: <6d97075e-d62c-6f85-3cba-c3f7c71fdbbf@quicinc.com> Date: Tue, 24 May 2022 15:44:59 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20220523224702.2002652-1-nathan@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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 Hey Nathan, Thanks for the fix! On 5/24/22 4:17 AM, Nathan Chancellor wrote: > 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 Reviewed-by: Sibi Sankar > --- > 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 >