Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752013AbdGIHFV (ORCPT ); Sun, 9 Jul 2017 03:05:21 -0400 Received: from mga09.intel.com ([134.134.136.24]:16395 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751096AbdGIHFU (ORCPT ); Sun, 9 Jul 2017 03:05:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,333,1496127600"; d="scan'208";a="876868935" Date: Sun, 9 Jul 2017 10:05:15 +0300 From: Jarkko Sakkinen To: Arvind Yadav Cc: peterhuewe@gmx.de, tpmdd@selhorst.net, jgunthorpe@obsidianresearch.com, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tpm: tpm_crb: constify acpi_device_id. Message-ID: <20170709070515.7dxpf42gqbx3r43q@linux.intel.com> References: <8a670ac215126b76d72861319a0d45e17759ad66.1499363107.git.arvind.yadav.cs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8a670ac215126b76d72861319a0d45e17759ad66.1499363107.git.arvind.yadav.cs@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1297 Lines: 41 On Thu, Jul 06, 2017 at 11:18:39PM +0530, Arvind Yadav wrote: > acpi_device_id are not supposed to change at runtime. All functions > working with acpi_device_id provided by work with > const acpi_device_id. So mark the non-const structs as const. > > File size before: > text data bss dec hex filename > 4198 608 0 4806 12c6 drivers/char/tpm/tpm_crb.o > > File size After adding 'const': > text data bss dec hex filename > 4262 520 0 4782 12ae drivers/char/tpm/tpm_crb.o > > Signed-off-by: Arvind Yadav Thanks! Reviewed-by: Jarkko Sakkinen /Jarkko > --- > drivers/char/tpm/tpm_crb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c > index b917b9d..bf7189e 100644 > --- a/drivers/char/tpm/tpm_crb.c > +++ b/drivers/char/tpm/tpm_crb.c > @@ -665,7 +665,7 @@ static const struct dev_pm_ops crb_pm = { > SET_RUNTIME_PM_OPS(crb_pm_runtime_suspend, crb_pm_runtime_resume, NULL) > }; > > -static struct acpi_device_id crb_device_ids[] = { > +static const struct acpi_device_id crb_device_ids[] = { > {"MSFT0101", 0}, > {"", 0}, > }; > -- > 2.7.4 >