* [PATCH] extcon: int3496: constify acpi_device_id.
@ 2017-07-06 16:55 ` Arvind Yadav
2017-07-07 4:13 ` Chanwoo Choi
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-07-06 16:55 UTC (permalink / raw)
To: myungjoo.ham, cw00.choi; +Cc: linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] extcon: int3496: constify acpi_device_id.
2017-07-06 16:55 ` [PATCH] extcon: int3496: constify acpi_device_id Arvind Yadav
@ 2017-07-07 4:13 ` Chanwoo Choi
0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2017-07-07 4:13 UTC (permalink / raw)
To: Arvind Yadav, myungjoo.ham; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-07 4:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20170706165618epcas5p1b527daa8f6674282d0bf72fc9bad9461@epcas5p1.samsung.com>
2017-07-06 16:55 ` [PATCH] extcon: int3496: constify acpi_device_id Arvind Yadav
2017-07-07 4:13 ` Chanwoo Choi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox