Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1682611 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-07-06 19:50 +0200 |
| Last post | 2017-07-16 13:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] tpm: tpm_crb: constify acpi_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-06 19:50 +0200
Re: [PATCH] tpm: tpm_crb: constify acpi_device_id. Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-07-09 09:10 +0200
Re: [PATCH] tpm: tpm_crb: constify acpi_device_id. Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-07-16 13:30 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-07-06 19:50 +0200 |
| Subject | [PATCH] tpm: tpm_crb: constify acpi_device_id. |
| Message-ID | <u0j4B-dn-11@gated-at.bofh.it> |
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
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 <arvind.yadav.cs@gmail.com>
---
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
[toc] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2017-07-09 09:10 +0200 |
| Message-ID | <u1evT-4FV-1@gated-at.bofh.it> |
| In reply to | #1682611 |
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 <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
> 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 <arvind.yadav.cs@gmail.com>
Thanks!
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
/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
>
[toc] | [prev] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2017-07-16 13:30 +0200 |
| Message-ID | <u3PUl-6KN-1@gated-at.bofh.it> |
| In reply to | #1682611 |
On Thu, 2017-07-06 at 23:18 +0530, Arvind Yadav wrote:
> 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
> 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 <arvind.yadav.cs@gmail.com>
> ---
> 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},
> };
Applied.
/Jarkko
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web