New variables are added to make the code more readable.
Signed-off-by: Arushi Singhal <redacted>
---
changes in v3
-try to make the code much more readable.
drivers/staging/sm750fb/ddk750_mode.c | 61 ++++++++++++++++++++---------------
1 file changed, 35 insertions(+), 26 deletions(-)
From: Julia Lawall <hidden> Date: 2017-03-19 13:14:12
On Sun, 19 Mar 2017, Arushi Singhal wrote:
quoted hunk
New variables are added to make the code more readable.
Signed-off-by: Arushi Singhal <redacted>
---
changes in v3
-try to make the code much more readable.
drivers/staging/sm750fb/ddk750_mode.c | 61 ++++++++++++++++++++---------------
1 file changed, 35 insertions(+), 26 deletions(-)
This is back to the original incorrect solution. You can't declare
variables on the fly in Linux code. Variables have to be declared at the
top of a block.
But you can reuse the same variables over and over, if no one cares about
their previous values.
julia
+
+ poke32(CRT_HORIZONTAL_SYNC, temp);
+
+ unsigned int a = (pModeParam->vertical_total - 1) <<
+ CRT_VERTICAL_TOTAL_TOTAL_SHIFT;
+ unsigned int b = a & CRT_VERTICAL_TOTAL_TOTAL_MASK;
+ unsigned int c = (pModeParam->vertical_display_end - 1) &
+ CRT_VERTICAL_TOTAL_DISPLAY_END_MASK;
+ unsigned int temp = b | c;
+
+ poke32(CRT_VERTICAL_TOTAL, temp);
+
+ unsigned int a = pModeParam->vertical_sync_height <<
+ CRT_VERTICAL_SYNC_HEIGHT_SHIFT;
+ unsigned int b = a & CRT_VERTICAL_SYNC_HEIGHT_MASK;
+ unsigned int c = (pModeParam->vertical_sync_start - 1) &
+ CRT_VERTICAL_SYNC_START_MASK;
+ unsigned int temp = b | c;
+
+ poke32(CRT_VERTICAL_SYNC, temp);
tmp = DISPLAY_CTRL_TIMING | DISPLAY_CTRL_PLANE;
if (pModeParam->vertical_sync_polarity)
--
2.11.0
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
To post to this group, send email to outreachy-kernel@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170319130744.GA24605%40arushi-HP-Pavilion-Notebook.
For more options, visit https://groups.google.com/d/optout.
On Sun, Mar 19, 2017 at 2:11 PM, Julia Lawall [off-list ref] wrote:
On Sun, 19 Mar 2017, Arushi Singhal wrote:
quoted
New variables are added to make the code more readable.
Signed-off-by: Arushi Singhal <redacted>
---
changes in v3
-try to make the code much more readable.
drivers/staging/sm750fb/ddk750_mode.c | 61 ++++++++++++++++++++---------------
1 file changed, 35 insertions(+), 26 deletions(-)
This is back to the original incorrect solution. You can't declare
variables on the fly in Linux code. Variables have to be declared at the
top of a block.
Arushi: have you tried to compile this?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds