Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13787046pxu; Mon, 4 Jan 2021 04:37:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2Otujgnpme013Gb49TcA8uufv1Y9soJB2fgpWgvDBIsu773Gr9PT/LQP26S7TeJrRuSNi X-Received: by 2002:a17:906:a04e:: with SMTP id bg14mr24396481ejb.149.1609763873060; Mon, 04 Jan 2021 04:37:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609763873; cv=none; d=google.com; s=arc-20160816; b=YZ8KSfx0+cClrYTPp2tPa0QOBD/bfNlVFOR36I4KASs7FQxYzbWq3zUxY0NVwN5i/H QzHDVT+R0WLfRnKXKEeZhNtH2vql6hFI5c5ZwaS1aOaI2x+OgkFH9EyGxSQInNe3u7or b9qfMpUUEFvlFoqPlU0clx3nXM0HUOAAvDToHUa+sqrOVJFU5ojoisksptDOuJNkupar HyoLsL5MWH47lgQIFvkeF9xNcYDGx58S9PKu9Gmp1+PaZwVvRCVB72ge5KRoaVdAxunJ iN8ZOzc9uAqjAUUBguINF/WRmD3PD8dcjAWrHVfa8dSbaOfbW3SDFdsBoRq6Rvpeqwrr 24Kg== 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; bh=5wGZ1GPhO3W//V4Lylox6bP5qdJ1wx1nVDn4V/XONEs=; b=0+xQLaqzxcmF2dixNPHy/oqWqAUE0pJj1M3lAFAo1ghifZWT6SaJyDxH48efcrLIXy zNEE1flBjF9wNZOPVhVQ8REj41QiXmU3A49oGO/d5gw1hC8HrvT/c7XgpkXRtkh99SZ7 DXibhHcU2s9QhcIEj9wGPGDSA031iWhm5Ns96bGWDEWMwcPER060ktlLWkQ6ezocpD3F +9ctJrP4r2utqY9GRYlewFOpMTuJb4OkfJQMog6C1tQY00e4w10amW1KKE7Uk1Lpm4o9 oIR+aRCP/2uBBKKzY9JIKiwYC0+aYL+QBlN0NsP8zXaPR313ytKvpMuS3LMzUB+tq0HD 44kg== 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 gs18si32240028ejb.435.2021.01.04.04.37.29; Mon, 04 Jan 2021 04:37:53 -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 S1726612AbhADMfJ (ORCPT + 99 others); Mon, 4 Jan 2021 07:35:09 -0500 Received: from mail-oi1-f182.google.com ([209.85.167.182]:33312 "EHLO mail-oi1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbhADMfH (ORCPT ); Mon, 4 Jan 2021 07:35:07 -0500 Received: by mail-oi1-f182.google.com with SMTP id d203so31962099oia.0; Mon, 04 Jan 2021 04:34:52 -0800 (PST) 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=5wGZ1GPhO3W//V4Lylox6bP5qdJ1wx1nVDn4V/XONEs=; b=ek6Wt8xADzp3j6PEtaTHS71pGcg5Vu8G34HeBY0iMfCBh+7ZnniwkZPhdYlrnDY/rb s4jQwdJq6klhvfVig4aIBkQlLVuf1hiQEFfwGRCsoIKGhbNkvQ1qNdsR5Fv343H549P2 E3j8X/wsXNdIq6HSHHF+AAbiVYEgsK1njFGhqEpI955V+zbwlnkIKXLBAepUw59qmez2 Fqp61BsnDZilQ6axv8DfFfiWY6yQNAjAkmBvfop1HHuJ/XZDFqOOWCZipe30W5c6b2kF uYrp8slg/ZyoHHfxGMMnbw/ZzC7BMMuzbD7+xVK/6cBmjEkv24lYljNXdq5fJPe6oSkZ ix7g== X-Gm-Message-State: AOAM532rgylUg1UAjpRNYFTCWfuCR0L03bY1H9BG2dFPXOoTPEfZPABW FctydKkpVTfXq0TD1cDwr9+Y1wEskWxHjZE9wb4= X-Received: by 2002:aca:3cc5:: with SMTP id j188mr17782563oia.54.1609763666850; Mon, 04 Jan 2021 04:34:26 -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: <20201230145708.28544-3-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Geert Uytterhoeven Date: Mon, 4 Jan 2021 13:34:16 +0100 Message-ID: Subject: Re: [PATCH 2/2] spi: rpc-if: Remove CONFIG_PM_SLEEP ifdefery To: Lad Prabhakar Cc: Mark Brown , Jiri Kosina , Sergei Shtylyov , Pavel Machek , linux-spi , Linux Kernel Mailing List , Linux-Renesas , Prabhakar , Chris Brandt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > }, > }; > 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