diff mbox series

clk/ti/adpll: Make const pointer error a static const array

Message ID 20211127173036.150535-1-colin.i.king@gmail.com
State New
Headers show
Series clk/ti/adpll: Make const pointer error a static const array | expand

Commit Message

Colin Ian King Nov. 27, 2021, 5:30 p.m. UTC
Make const pointer error a static const array, removes a dereference
and shrinks object code a little.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/clk/ti/adpll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tony Lindgren Dec. 9, 2021, 7:43 a.m. UTC | #1
* Colin Ian King <colin.i.king@googlemail.com> [211127 19:33]:
> Make const pointer error a static const array, removes a dereference
> and shrinks object code a little.

Acked-by: Tony Lindgren <tony@atomide.com>
Stephen Boyd Dec. 9, 2021, 8:17 a.m. UTC | #2
Quoting Colin Ian King (2021-11-27 09:30:36)
> Make const pointer error a static const array, removes a dereference
> and shrinks object code a little.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---

Applied to clk-next
diff mbox series

Patch

diff --git a/drivers/clk/ti/adpll.c b/drivers/clk/ti/adpll.c
index b341cd990be7..962502ca7ff0 100644
--- a/drivers/clk/ti/adpll.c
+++ b/drivers/clk/ti/adpll.c
@@ -807,7 +807,7 @@  static int ti_adpll_init_registers(struct ti_adpll_data *d)
 
 static int ti_adpll_init_inputs(struct ti_adpll_data *d)
 {
-	const char *error = "need at least %i inputs";
+	static const char error[] = "need at least %i inputs";
 	struct clk *clock;
 	int nr_inputs;