* [PATCH] phy: qcom-qmp: make a const array static, makes object smaller
@ 2021-02-04 18:03 Colin King
2021-02-06 10:03 ` Vinod Koul
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-02-04 18:03 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I, Vinod Koul,
linux-arm-msm
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Don't populate the const array cfg1_settings on the stack but instead make
it static. Makes the object code smaller by 24 bytes:
Before:
text data bss dec hex filename
73585 20240 64 93889 16ec1 drivers/phy/qualcomm/phy-qcom-qmp.o
After:
text data bss dec hex filename
73465 20336 64 93865 16ea9 drivers/phy/qualcomm/phy-qcom-qmp.o
(gcc version 10.2.0)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
index a679b5fb7b48..d0dfb6743965 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
@@ -3421,7 +3421,7 @@ static int qcom_qmp_phy_configure_dp_phy(struct qmp_phy *qphy)
static int qcom_qmp_dp_phy_calibrate(struct phy *phy)
{
struct qmp_phy *qphy = phy_get_drvdata(phy);
- const u8 cfg1_settings[] = { 0x13, 0x23, 0x1d };
+ static const u8 cfg1_settings[] = { 0x13, 0x23, 0x1d };
u8 val;
qphy->dp_aux_cfg++;
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: qcom-qmp: make a const array static, makes object smaller
2021-02-04 18:03 [PATCH] phy: qcom-qmp: make a const array static, makes object smaller Colin King
@ 2021-02-06 10:03 ` Vinod Koul
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2021-02-06 10:03 UTC (permalink / raw)
To: Colin King
Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I,
linux-arm-msm, kernel-janitors, linux-kernel
On 04-02-21, 18:03, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate the const array cfg1_settings on the stack but instead make
> it static. Makes the object code smaller by 24 bytes:
>
> Before:
> text data bss dec hex filename
> 73585 20240 64 93889 16ec1 drivers/phy/qualcomm/phy-qcom-qmp.o
>
> After:
> text data bss dec hex filename
> 73465 20336 64 93865 16ea9 drivers/phy/qualcomm/phy-qcom-qmp.o
>
> (gcc version 10.2.0)
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: qcom-qmp: make a const array static, makes object smaller
2021-02-04 18:03 [PATCH] phy: qcom-qmp: make a const array static, makes object smaller Colin King
2021-02-06 10:03 ` Vinod Koul
@ 2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-03-01 19:59 UTC (permalink / raw)
To: Colin King; +Cc: linux-arm-msm
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
On Thu, 4 Feb 2021 18:03:13 +0000 you wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate the const array cfg1_settings on the stack but instead make
> it static. Makes the object code smaller by 24 bytes:
>
> Before:
> text data bss dec hex filename
> 73585 20240 64 93889 16ec1 drivers/phy/qualcomm/phy-qcom-qmp.o
>
> [...]
Here is the summary with links:
- phy: qcom-qmp: make a const array static, makes object smaller
https://git.kernel.org/qcom/c/43851904cbd7
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-01 20:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 18:03 [PATCH] phy: qcom-qmp: make a const array static, makes object smaller Colin King
2021-02-06 10:03 ` Vinod Koul
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
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 NNTP newsgroup(s).