* [PATCH 1/1] pinctrl: actions: pinctrl-s500: Constify s500_padinfo[]
@ 2020-11-18 18:10 ` Cristian Ciocaltea
0 siblings, 0 replies; 4+ messages in thread
From: Cristian Ciocaltea @ 2020-11-18 18:10 UTC (permalink / raw)
To: Andreas Färber, Manivannan Sadhasivam, Linus Walleij
Cc: linux-arm-kernel, linux-gpio, linux-kernel, linux-actions
s500_padinfo[] is never modified and should be made 'const' to allow
the compiler to optimize code generation, i.e. put it in the text
section instead of the data section.
Before:
text data bss dec hex filename
12503 5088 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o
After:
text data bss dec hex filename
14435 3156 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
drivers/pinctrl/actions/pinctrl-s500.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/actions/pinctrl-s500.c b/drivers/pinctrl/actions/pinctrl-s500.c
index 38e30914af6e..ced778079b76 100644
--- a/drivers/pinctrl/actions/pinctrl-s500.c
+++ b/drivers/pinctrl/actions/pinctrl-s500.c
@@ -1485,7 +1485,7 @@ static PAD_PULLCTL_CONF(DNAND_D6, 2, 2, 1);
static PAD_PULLCTL_CONF(DNAND_D7, 2, 2, 1);
/* Pad info table */
-static struct owl_padinfo s500_padinfo[NUM_PADS] = {
+static const struct owl_padinfo s500_padinfo[NUM_PADS] = {
[DNAND_DQS] = PAD_INFO_PULLCTL(DNAND_DQS),
[DNAND_DQSN] = PAD_INFO_PULLCTL(DNAND_DQSN),
[ETH_TXD0] = PAD_INFO_ST(ETH_TXD0),
--
2.29.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/1] pinctrl: actions: pinctrl-s500: Constify s500_padinfo[]
@ 2020-11-18 18:10 ` Cristian Ciocaltea
0 siblings, 0 replies; 4+ messages in thread
From: Cristian Ciocaltea @ 2020-11-18 18:10 UTC (permalink / raw)
To: Andreas Färber, Manivannan Sadhasivam, Linus Walleij
Cc: linux-gpio, linux-actions, linux-kernel, linux-arm-kernel
s500_padinfo[] is never modified and should be made 'const' to allow
the compiler to optimize code generation, i.e. put it in the text
section instead of the data section.
Before:
text data bss dec hex filename
12503 5088 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o
After:
text data bss dec hex filename
14435 3156 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
drivers/pinctrl/actions/pinctrl-s500.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/actions/pinctrl-s500.c b/drivers/pinctrl/actions/pinctrl-s500.c
index 38e30914af6e..ced778079b76 100644
--- a/drivers/pinctrl/actions/pinctrl-s500.c
+++ b/drivers/pinctrl/actions/pinctrl-s500.c
@@ -1485,7 +1485,7 @@ static PAD_PULLCTL_CONF(DNAND_D6, 2, 2, 1);
static PAD_PULLCTL_CONF(DNAND_D7, 2, 2, 1);
/* Pad info table */
-static struct owl_padinfo s500_padinfo[NUM_PADS] = {
+static const struct owl_padinfo s500_padinfo[NUM_PADS] = {
[DNAND_DQS] = PAD_INFO_PULLCTL(DNAND_DQS),
[DNAND_DQSN] = PAD_INFO_PULLCTL(DNAND_DQSN),
[ETH_TXD0] = PAD_INFO_ST(ETH_TXD0),
--
2.29.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] pinctrl: actions: pinctrl-s500: Constify s500_padinfo[]
2020-11-18 18:10 ` Cristian Ciocaltea
@ 2020-12-04 8:07 ` Linus Walleij
-1 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2020-12-04 8:07 UTC (permalink / raw)
To: Cristian Ciocaltea
Cc: Andreas Färber, Manivannan Sadhasivam, Linux ARM,
open list:GPIO SUBSYSTEM, linux-kernel, linux-actions
On Wed, Nov 18, 2020 at 7:10 PM Cristian Ciocaltea
<cristian.ciocaltea@gmail.com> wrote:
> s500_padinfo[] is never modified and should be made 'const' to allow
> the compiler to optimize code generation, i.e. put it in the text
> section instead of the data section.
>
> Before:
> text data bss dec hex filename
> 12503 5088 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o
>
> After:
> text data bss dec hex filename
> 14435 3156 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] pinctrl: actions: pinctrl-s500: Constify s500_padinfo[]
@ 2020-12-04 8:07 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2020-12-04 8:07 UTC (permalink / raw)
To: Cristian Ciocaltea
Cc: linux-actions, linux-kernel, open list:GPIO SUBSYSTEM,
Manivannan Sadhasivam, Andreas Färber, Linux ARM
On Wed, Nov 18, 2020 at 7:10 PM Cristian Ciocaltea
<cristian.ciocaltea@gmail.com> wrote:
> s500_padinfo[] is never modified and should be made 'const' to allow
> the compiler to optimize code generation, i.e. put it in the text
> section instead of the data section.
>
> Before:
> text data bss dec hex filename
> 12503 5088 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o
>
> After:
> text data bss dec hex filename
> 14435 3156 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Patch applied.
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-04 8:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 18:10 [PATCH 1/1] pinctrl: actions: pinctrl-s500: Constify s500_padinfo[] Cristian Ciocaltea
2020-11-18 18:10 ` Cristian Ciocaltea
2020-12-04 8:07 ` Linus Walleij
2020-12-04 8:07 ` Linus Walleij
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.