Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933299AbdGKOm7 (ORCPT ); Tue, 11 Jul 2017 10:42:59 -0400 Received: from mail-qk0-f180.google.com ([209.85.220.180]:32940 "EHLO mail-qk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933172AbdGKOm4 (ORCPT ); Tue, 11 Jul 2017 10:42:56 -0400 MIME-Version: 1.0 In-Reply-To: <8a917dbec5b7eb9fd463cc9b7a596ab831f04965.1498723559.git.arvind.yadav.cs@gmail.com> References: <8a917dbec5b7eb9fd463cc9b7a596ab831f04965.1498723559.git.arvind.yadav.cs@gmail.com> From: Ulf Hansson Date: Tue, 11 Jul 2017 16:42:55 +0200 Message-ID: Subject: Re: [PATCH] mmc: host: omap_hsmmc: constify dev_pm_ops structures. To: Arvind Yadav Cc: Dan Carpenter , Linus Walleij , Heiner Kallweit , "linux-mmc@vger.kernel.org" , linux-omap , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1380 Lines: 40 On 29 June 2017 at 10:09, Arvind Yadav wrote: > dev_pm_ops are not supposed to change at runtime. All functions > working with dev_pm_ops provided by work with const > dev_pm_ops. So mark the non-const structs as const. > > File size before: > text data bss dec hex filename > 11586 624 0 12210 2fb2 drivers/mmc/host/omap_hsmmc.o > > File size After adding 'const': > text data bss dec hex filename > 11778 432 0 12210 2fb2 drivers/mmc/host/omap_hsmmc.o > > Signed-off-by: Arvind Yadav Thanks, applied for next! Kind regards Uffe > --- > drivers/mmc/host/omap_hsmmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c > index 8c39dcc..5b391dc 100644 > --- a/drivers/mmc/host/omap_hsmmc.c > +++ b/drivers/mmc/host/omap_hsmmc.c > @@ -2342,7 +2342,7 @@ static int omap_hsmmc_runtime_resume(struct device *dev) > return 0; > } > > -static struct dev_pm_ops omap_hsmmc_dev_pm_ops = { > +static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = { > SET_SYSTEM_SLEEP_PM_OPS(omap_hsmmc_suspend, omap_hsmmc_resume) > .runtime_suspend = omap_hsmmc_runtime_suspend, > .runtime_resume = omap_hsmmc_runtime_resume, > -- > 1.9.1 >