Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1682587 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-07-06 19:00 +0200 |
| Last post | 2017-07-07 06:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] extcon: int3496: constify acpi_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-06 19:00 +0200
Re: [PATCH] extcon: int3496: constify acpi_device_id. Chanwoo Choi <cw00.choi@samsung.com> - 2017-07-07 06:20 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-07-06 19:00 +0200 |
| Subject | [PATCH] extcon: int3496: constify acpi_device_id. |
| Message-ID | <u0iid-87X-13@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
1733 352 0 2085 825 drivers/extcon/extcon-intel-int3496.o
File size After adding 'const':
text data bss dec hex filename
1797 272 0 2069 815 drivers/extcon/extcon-intel-int3496.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/extcon/extcon-intel-int3496.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
index 9d17984..49bf9c6 100644
--- a/drivers/extcon/extcon-intel-int3496.c
+++ b/drivers/extcon/extcon-intel-int3496.c
@@ -174,7 +174,7 @@ static int int3496_remove(struct platform_device *pdev)
return 0;
}
-static struct acpi_device_id int3496_acpi_match[] = {
+static const struct acpi_device_id int3496_acpi_match[] = {
{ "INT3496" },
{ }
};
--
2.7.4
[toc] | [next] | [standalone]
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Date | 2017-07-07 06:20 +0200 |
| Message-ID | <u0sUh-71X-3@gated-at.bofh.it> |
| In reply to | #1682587 |
On 2017년 07월 07일 01:55, 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
> 1733 352 0 2085 825 drivers/extcon/extcon-intel-int3496.o
>
> File size After adding 'const':
> text data bss dec hex filename
> 1797 272 0 2069 815 drivers/extcon/extcon-intel-int3496.o
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/extcon/extcon-intel-int3496.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
> index 9d17984..49bf9c6 100644
> --- a/drivers/extcon/extcon-intel-int3496.c
> +++ b/drivers/extcon/extcon-intel-int3496.c
> @@ -174,7 +174,7 @@ static int int3496_remove(struct platform_device *pdev)
> return 0;
> }
>
> -static struct acpi_device_id int3496_acpi_match[] = {
> +static const struct acpi_device_id int3496_acpi_match[] = {
> { "INT3496" },
> { }
> };
>
Applied it.
--
Best Regards,
Chanwoo Choi
Samsung Electronics
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web