From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4E472C77B61 for ; Tue, 25 Apr 2023 17:19:36 +0000 (UTC) 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:In-Reply-To:From:References:CC:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bxbe+E7++kdLBHXufaWikO9glOug84nHIPkCdKc5qKI=; b=U9PAnzr+GAUr2g CoZ0oE6mHH/pKa6/GT9rXH+DhLi4VdnN6Cd+n4UeE1ATBMd6r4uQ/j/GdKMtUHfMuo8Az2oZr5u1H CVD172QUAMH3thWZFJPfkrEW2iqNpRPcQGFyVore/QHHrdd2eUcxqur5R7gTvAKgV11O7e4LAFmLp mCWIEAM+VIyMhgcwZvnRt8qQ23Ibc6I6f/kY0mnua2L7YxtJzxHjCgdIpC7zNWEJX0wancxf39C86 srrMbeVfSDCympdZhySSmHy7GoPuKHwrRg7QCFVjoGaXbthyPSlz5dltUCyW+cxe4lP7YJfXWe7za NdC4GX+6XB1Z+q+MqeUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1prMJH-001nK9-2Y; Tue, 25 Apr 2023 17:18:35 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1prMJD-001nId-1i for linux-arm-kernel@lists.infradead.org; Tue, 25 Apr 2023 17:18:33 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33PHIMgc093146; Tue, 25 Apr 2023 12:18:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1682443102; bh=8UWEHdzwym7D2TJjdzjZDDZMXCWez9fzFsKRaVXXaTk=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=ptMS8rr2tUkkNzoEL2BE3fjKxpIgNRGOqhyglMx767ne6zjKBbPKhNFDqDQ3aFOqm 2KgrL8RGpshIhbqFGKC6DnYhDzJvXssgYBML8J17kZ3nIDMBNVEI9w9/FeQQVTl4pI UDPwVN9U8w+dSfuFiblTyKfhNsAIx+liQhKRWsco= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33PHIMtS087348 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 25 Apr 2023 12:18:22 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 25 Apr 2023 12:18:21 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 25 Apr 2023 12:18:21 -0500 Received: from [10.250.150.138] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33PHIGaj024841; Tue, 25 Apr 2023 12:18:17 -0500 Message-ID: <602392dc-de1f-90bf-3deb-cb5cee81e41c@ti.com> Date: Tue, 25 Apr 2023 22:48:16 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] spi: bcm63xx: remove PM_SLEEP based conditional compilation Content-Language: en-US To: Guenter Roeck CC: Mark Brown , Vaishnav Achath , Vignesh , Apurva Nandan , , , , Grant Likely , Tanguy Bouzeloc References: <20230420121615.967487-1-d-gole@ti.com> <8edb48ee-55a3-4cc2-9c81-514ec867b35c@roeck-us.net> From: "Gole, Dhruva" Organization: Texas Instruments Incorporated In-Reply-To: <8edb48ee-55a3-4cc2-9c81-514ec867b35c@roeck-us.net> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230425_101831_667386_83CC770A X-CRM114-Status: GOOD ( 13.28 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 4/25/2023 8:38 PM, Guenter Roeck wrote: > On Thu, Apr 20, 2023 at 05:46:15PM +0530, Dhruva Gole wrote: >> Get rid of conditional compilation based on CONFIG_PM_SLEEP because >> it may introduce build issues with certain configs where it maybe disabled >> This is because if above config is not enabled the suspend-resume >> functions are never part of the code but the bcm63xx_spi_pm_ops struct >> still inits them to non-existent suspend-resume functions. >> >> Fixes: b42dfed83d95 ("spi: add Broadcom BCM63xx SPI controller driver") >> >> Signed-off-by: Dhruva Gole > This patch results in: > > drivers/spi/spi-bcm63xx.c:632:12: error: 'bcm63xx_spi_resume' defined but not used [-Werror=unused-function] > 632 | static int bcm63xx_spi_resume(struct device *dev) > | ^~~~~~~~~~~~~~~~~~ > drivers/spi/spi-bcm63xx.c:620:12: error: 'bcm63xx_spi_suspend' defined but not used [-Werror=unused-function] > 620 | static int bcm63xx_spi_suspend(struct device *dev) > > on architectures with no PM support (alpha, csky, m68k, openrisc, parisc, > riscv, s390). Thanks for pointing this out. I could send a patch to address this as pointed here [0] by adding a __maybe_unused. However, do you think my other patch [1] could address this issue without the need for above? I think it would because DEFINE_SIMPLE_DEV_PM_OPS doesn't seem to be under any conditional CONFIG_PM. However, I may have missed something, please do let me know what's the best way to fix. [0] https://lore.kernel.org/all/24ec3728-9720-ae6a-9ff5-3e2e13a96f76@gmail.com/ [1] https://lore.kernel.org/all/20230424102546.1604484-1-d-gole@ti.com/ > > Guenter -- Regards, Dhruva Gole _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel