Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp360475pxu; Thu, 7 Jan 2021 06:56:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2++IcMbH+OmNlD5qq9wNCwFsnsH/+DVPys38KMh4hfJ9TqdAJTKGwo8f+ilkuQ9hqZhXX X-Received: by 2002:a05:6402:379:: with SMTP id s25mr2033286edw.367.1610031389158; Thu, 07 Jan 2021 06:56:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610031389; cv=none; d=google.com; s=arc-20160816; b=zSe9kDazMUNDo9sLh2ztc6+DZYqn+c66BLFXjqSUPFCQHhvC+c6Et8V+UBLp4w1jqq rSkv2rmE0RXdXhgHAfhMNXI13aOd9THX0nrSW+XJTQn84qFs97/9ns3AJLsbs67lb5QY zbheb64E31KN9QqJ9mg9JI/q/JTLvbugdvWV3PiK4IjkCNG7OZwifGq8X1pQpKS1EGBr 9Ov8mlrDJ3gxn3dZ2Pk1cS7CG68CuZXe8L84Sl2JslTYD8l6eQJ6Pl8PK0yIfyg3W7Nd ZRD5PZot6tkpYbXrQakjIxRfbZbnrLBM6hdpIoBURC+D9qywaVqzPNlvaToMlll6ctvQ SjQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=UEP5bevQu1kB3oS6QWhkPd/ULGsV62Nq1yLxjR5CKYc=; b=KMDFu9S/BksM0nocOlxbXgtKGLtvyGZIksCBwrXDoCTBsg9w9xWFki01ucs11Qavpl CFo72QRVYydDGY9cSl4acElvFE5EMJfPDGYBgQ2yqhYaARcfc6KWfKRq0FbLxA2aH9UP KVzPGl4H136X4nHdDpjtAMaJxffTEo9XI3uS1xNHU1FODx/EKJQriVT/mcwPw6WfcWPB fzj+UneBoKPuGrNlrESGZUM6jTatB8N2phfpvd98/SUyfokQVt4t6PYHna2HhnOxJKaQ yAbwJq/rGiEdxKZwpOXnov5sQQ3OU7SIw2ijPeeohd42e+cZ8nJ0qgK792+ZGJmKjRok ETFw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx4si2232884edb.137.2021.01.07.06.56.04; Thu, 07 Jan 2021 06:56:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727984AbhAGOzI (ORCPT + 99 others); Thu, 7 Jan 2021 09:55:08 -0500 Received: from relmlor1.renesas.com ([210.160.252.171]:34261 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726151AbhAGOzH (ORCPT ); Thu, 7 Jan 2021 09:55:07 -0500 X-IronPort-AV: E=Sophos;i="5.79,329,1602514800"; d="scan'208";a="68320324" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 07 Jan 2021 23:54:15 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id B8DF54010916; Thu, 7 Jan 2021 23:54:13 +0900 (JST) From: Lad Prabhakar To: Geert Uytterhoeven , Pavel Machek , Mark Brown Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH] spi: rpc-if: Gaurd .pm assignment with CONFIG_PM_SLEEP #ifdef check Date: Thu, 7 Jan 2021 14:53:29 +0000 Message-Id: <20210107145329.27966-1-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With CONFIG_PM_SLEEP disabled the rpcif_spi_pm_ops variable is still referenced and thus increasing the size of kernel. Fix this issue by adding CONFIG_PM_SLEEP #ifdef check around the .pm assignment (image size is critical on RZ/A SoC's where the SRAM sizes range 4~5 MiB). Fixes: 9584fc95cadc0 ("spi: rpc-if: Remove CONFIG_PM_SLEEP ifdefery") Reported-by: Geert Uytterhoeven Suggested-by: Pavel Machek Signed-off-by: Lad Prabhakar --- drivers/spi/spi-rpc-if.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-rpc-if.c b/drivers/spi/spi-rpc-if.c index c313dbe6185c..c53138ce0030 100644 --- a/drivers/spi/spi-rpc-if.c +++ b/drivers/spi/spi-rpc-if.c @@ -197,7 +197,9 @@ static struct platform_driver rpcif_spi_driver = { .remove = rpcif_spi_remove, .driver = { .name = "rpc-if-spi", +#ifdef CONFIG_PM_SLEEP .pm = &rpcif_spi_pm_ops, +#endif }, }; module_platform_driver(rpcif_spi_driver); -- 2.17.1