* [PATCH] video: fbdev: kyro: make read-only array ODValues static const
@ 2022-03-08 20:23 Colin Ian King
2022-03-11 7:30 ` Helge Deller
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-03-08 20:23 UTC (permalink / raw)
To: Helge Deller, linux-fbdev, dri-devel; +Cc: kernel-janitors, linux-kernel
Don't populate the read-only array ODValues on the stack but
instead make it static const. Also makes the object code a little
smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/video/fbdev/kyro/STG4000InitDevice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/kyro/STG4000InitDevice.c b/drivers/video/fbdev/kyro/STG4000InitDevice.c
index 21875d3c2dc2..ffeb355c8b50 100644
--- a/drivers/video/fbdev/kyro/STG4000InitDevice.c
+++ b/drivers/video/fbdev/kyro/STG4000InitDevice.c
@@ -124,7 +124,7 @@ u32 ProgramClock(u32 refClock,
u32 ulScore, ulPhaseScore, ulVcoScore;
u32 ulTmp = 0, ulVCO;
u32 ulScaleClockReq, ulMinClock, ulMaxClock;
- u32 ODValues[] = { 1, 2, 0 };
+ static const u32 ODValues[] = { 1, 2, 0 };
/* Translate clock in Hz */
coreClock *= 100; /* in Hz */
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] video: fbdev: kyro: make read-only array ODValues static const
2022-03-08 20:23 [PATCH] video: fbdev: kyro: make read-only array ODValues static const Colin Ian King
@ 2022-03-11 7:30 ` Helge Deller
0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2022-03-11 7:30 UTC (permalink / raw)
To: Colin Ian King, linux-fbdev, dri-devel; +Cc: kernel-janitors, linux-kernel
On 3/8/22 21:23, Colin Ian King wrote:
> Don't populate the read-only array ODValues on the stack but
> instead make it static const. Also makes the object code a little
> smaller.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>
> ---
> drivers/video/fbdev/kyro/STG4000InitDevice.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/kyro/STG4000InitDevice.c b/drivers/video/fbdev/kyro/STG4000InitDevice.c
> index 21875d3c2dc2..ffeb355c8b50 100644
> --- a/drivers/video/fbdev/kyro/STG4000InitDevice.c
> +++ b/drivers/video/fbdev/kyro/STG4000InitDevice.c
> @@ -124,7 +124,7 @@ u32 ProgramClock(u32 refClock,
> u32 ulScore, ulPhaseScore, ulVcoScore;
> u32 ulTmp = 0, ulVCO;
> u32 ulScaleClockReq, ulMinClock, ulMaxClock;
> - u32 ODValues[] = { 1, 2, 0 };
> + static const u32 ODValues[] = { 1, 2, 0 };
applied, but I made this:
static const unsigned char
Thanks!
Helge
>
> /* Translate clock in Hz */
> coreClock *= 100; /* in Hz */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-11 7:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 20:23 [PATCH] video: fbdev: kyro: make read-only array ODValues static const Colin Ian King
2022-03-11 7:30 ` Helge Deller
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.