tpmdd-devel Archive mirror
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: peterhuewe@gmx.de, tpmdd@selhorst.net,
	jarkko.sakkinen@linux.intel.com, jgunthorpe@obsidianresearch.com
Cc: tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [PATCH] tpm: tpm_tis: constify acpi_device_id.
Date: Thu,  6 Jul 2017 23:22:09 +0530	[thread overview]
Message-ID: <71fede87f425d9282e4e3e1ff9c600c2a4969358.1499363481.git.arvind.yadav.cs@gmail.com> (raw)

acpi_device_id are not supposed to change at runtime. All functions
working with acpi_device_id provided by <acpi/acpi_bus.h> work with
const acpi_device_id. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
   2758	   1089	     10	   3857	    f11	drivers/char/tpm/tpm_tis.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   2854	    993	     10	   3857	    f11	drivers/char/tpm/tpm_tis.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/char/tpm/tpm_tis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index c7e1384..a66e03e 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -297,7 +297,7 @@ static int tpm_tis_acpi_remove(struct acpi_device *dev)
 	return 0;
 }
 
-static struct acpi_device_id tpm_acpi_tbl[] = {
+static const struct acpi_device_id tpm_acpi_tbl[] = {
 	{"MSFT0101", 0},	/* TPM 2.0 */
 	/* Add new here */
 	{"", 0},		/* User Specified */
-- 
2.7.4

                 reply	other threads:[~2017-07-06 17:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71fede87f425d9282e4e3e1ff9c600c2a4969358.1499363481.git.arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=tpmdd@selhorst.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).