Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14181772pxu; Mon, 4 Jan 2021 15:25:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/mknX8N9XsdTadCwFEYIKSZmv49IL9N5bYQwl2k7Qw1qvxYCy6scm/DNQL/NXFcwm+H/D X-Received: by 2002:a17:906:eb5b:: with SMTP id mc27mr67736201ejb.163.1609802709558; Mon, 04 Jan 2021 15:25:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609802709; cv=none; d=google.com; s=arc-20160816; b=rZ6BAMeYQCY8WuBaF6tzA0BjBpROARr8P5SJQ6IkFo2Dlq2RDvXsfjh7yvWswthWGu MGEgjW/aUxnaTEayvJ5SNrxF3garmVIyw7Zp1dM6tkyV6CThdphvpJx7vVpCCBG6SE08 olpmI5zVnkxpPgh7XzqZtWh8dNMuLj4WRwehmHNGCuYvbr2Gg4tNEf8QXG4UMS9L/vig EyYLd3Y+GxUZjQV90YRMfUjzwgJ8eSuOWSmMuWJr7DJjdoIXc9/rSsm4djUM/wYIENYZ Bn0k4WhXOztzGZk/7m5EFLKqXAoLGRO1RHPxkyETU/3j9ZAZdCAlV3UjQy2AjLwQM4g9 mSVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=IHs0gNL0FYkfrPjV8CfFXH60XzdEKDMfQo9YOTLu8ng=; b=bc3byDhyesdcFtpyAuHb6n9hd4/TP/o0mm1RdcTmUOFhXndBpMOb6lWzIPbesfOYVC VOS1crSV0JrXSrhE0zJ/gnGWJ26ZuwvNtEUrwflTqe/fX3ibJxIisJ1MTeQauTGjY4A9 HZ6tdW0PZff2sBVChxY6rPHOcO6YYIvz9//W/InN2C62dj2cfLAWRU8ALTl6dKEirfaM Pxy4X+UPV9YUcshkI2M8t5lvCL1RsGeiqsElVqKVezTqaD95jRGzb9ldEfy96TCvzPtY tQ2jlg2sMr2u2ddYHgVUYhEzKeCcAaCanSgfpX0RhMNlua1Fo1pRlqabf1fCPPluWpAz 9QxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=crfcATRH; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c22si28488648ejx.290.2021.01.04.15.24.46; Mon, 04 Jan 2021 15:25:09 -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=@gmail.com header.s=20161025 header.b=crfcATRH; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727599AbhADXXX (ORCPT + 99 others); Mon, 4 Jan 2021 18:23:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbhADXXW (ORCPT ); Mon, 4 Jan 2021 18:23:22 -0500 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28B3AC061574; Mon, 4 Jan 2021 15:22:42 -0800 (PST) Received: by mail-yb1-xb2b.google.com with SMTP id o144so27608775ybc.0; Mon, 04 Jan 2021 15:22:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IHs0gNL0FYkfrPjV8CfFXH60XzdEKDMfQo9YOTLu8ng=; b=crfcATRH8ZA7jh72kSOsnKPAdEsZJgta/Z1XwNRlB8h1RfHUTXK2s3+7Jeu+sUUppo W+iQZRS+YLavlxBAibp8ISoWy+5kWCHwXM5LdYf/7biMfU+gNW8jg+vILXnN9dfgnR00 dHGzrDgykxhY7Q/Lei76JJ9ANzriPKRB48+3MtdHWRaGzBtp1xxDbKhsaMt+aH5fOnP9 wOo6fSRqeKmIS63qizWCL1h4nKGEaGB+J3BnO9fxesHPE81lUhZYRKXoJ3imVmfH5DI1 Ac8jJ9EA+huVshhjH3zLzPHQUaK8KILgY2LVL0kUny4ZpMfbb02Kp1XK1R+q4zwbZVpg F9lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IHs0gNL0FYkfrPjV8CfFXH60XzdEKDMfQo9YOTLu8ng=; b=a1Y1cjTWEzAc3W+llgItTNn93RBAd3HSEA4KubbEEKxgMB5M8sXMx06nPYo85it/uY uLEg7l8rB3i3dYtsVFj+L6lX1qEZc0eYrMlOyPkSWAYFLVU6fpDHbjyUvmH4Me9w636U +RaFuHkk1x0c8vhatd0AaINP0U/n73R9hCnsxq6o7yQ4FQ+wICYZ749/oQnEyUlaR1ET wu18yJ5f+qdkO+fQinIDiwQqfy1XBwjjzpHzDz36SHIGMUhOGHqho6+e8iafhCZ+fSR+ k5GZl8tlcKUy18BErZ9MjK2tzoux8+u82RqqN+3U5laXhjVMr51p2sbPHoAPsniENCw0 i+tw== X-Gm-Message-State: AOAM5317D6S4ko0AVagbFKoYRF4VOiG+ssALfKLnKXrXSyceuxMgUpUF 0hCY2N1xMFJfT446JZKTEqc0F4q39s0x0y9LFwJqH3p6Wzo= X-Received: by 2002:a25:5f07:: with SMTP id t7mr107189415ybb.395.1609795543692; Mon, 04 Jan 2021 13:25:43 -0800 (PST) MIME-Version: 1.0 References: <20201230145708.28544-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20201230145708.28544-3-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Mon, 4 Jan 2021 21:25:17 +0000 Message-ID: Subject: Re: [PATCH 2/2] spi: rpc-if: Remove CONFIG_PM_SLEEP ifdefery To: Geert Uytterhoeven , Mark Brown , Pavel Machek Cc: Lad Prabhakar , Jiri Kosina , Sergei Shtylyov , linux-spi , Linux Kernel Mailing List , Linux-Renesas , Chris Brandt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, Thank you for the review. On Mon, Jan 4, 2021 at 12:34 PM Geert Uytterhoeven wrote: > > Hi Prabhakar, > > On Wed, Dec 30, 2020 at 4:00 PM Lad Prabhakar > wrote: > > Use __maybe_unused for the suspend()/resume() hooks and get rid of > > the CONFIG_PM_SLEEP ifdefery to improve the code. > > > > Suggested-by: Pavel Machek > > Signed-off-by: Lad Prabhakar > > Thanks for your patch! > > > --- a/drivers/spi/spi-rpc-if.c > > +++ b/drivers/spi/spi-rpc-if.c > > @@ -176,15 +176,14 @@ static int rpcif_spi_remove(struct platform_device *pdev) > > return 0; > > } > > > > -#ifdef CONFIG_PM_SLEEP > > -static int rpcif_spi_suspend(struct device *dev) > > +static int __maybe_unused rpcif_spi_suspend(struct device *dev) > > { > > struct spi_controller *ctlr = dev_get_drvdata(dev); > > > > return spi_controller_suspend(ctlr); > > } > > > > -static int rpcif_spi_resume(struct device *dev) > > +static int __maybe_unused rpcif_spi_resume(struct device *dev) > > { > > struct spi_controller *ctlr = dev_get_drvdata(dev); > > > > @@ -192,17 +191,13 @@ static int rpcif_spi_resume(struct device *dev) > > } > > > > static SIMPLE_DEV_PM_OPS(rpcif_spi_pm_ops, rpcif_spi_suspend, rpcif_spi_resume); > > -#define DEV_PM_OPS (&rpcif_spi_pm_ops) > > -#else > > -#define DEV_PM_OPS NULL > > -#endif > > > > static struct platform_driver rpcif_spi_driver = { > > .probe = rpcif_spi_probe, > > .remove = rpcif_spi_remove, > > .driver = { > > .name = "rpc-if-spi", > > - .pm = DEV_PM_OPS, > > + .pm = &rpcif_spi_pm_ops, > > You're aware rpcif_spi_pm_ops is now always referenced and thus emitted, > increasing kernel size by 92 bytes if CONFIG_PM_SLEEP=n? > This may matter for RZ/A SoCs running from internal SRAM. > Hmm didn't realise this would be an issue on RZ/A. Mark, could you please drop this patch from your branch. Cheers, Prabhakar > > }, > > }; > > module_platform_driver(rpcif_spi_driver); > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds