Skip to content

Commit e911044

Browse files
fthaingeertu
authored andcommitted
m68k: Remove unused "cursor home" code from debug console
The cursor home operation is unused and seems undesirable for logging. Remove it. The console_not_cr label actually means "not line feed and not carriage return either" so take the opportunity to replace it with something less confusing. Rectify some inconsistent whitespace while we're here. Signed-off-by: Finn Thain <[email protected]> Tested-by: Stan Johnson <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/ec2d443d3c3213028bbbab7c2e0382cd53db75fe.1743115195.git.fthain@linux-m68k.org Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 0da6458 commit e911044

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

arch/m68k/kernel/head.S

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3555,28 +3555,21 @@ func_start console_putc,%a0/%a1/%d0-%d7
35553555
jra L(console_exit)
35563556

35573557
L(console_not_lf):
3558-
cmpib #13,%d7
3559-
jne L(console_not_cr)
3558+
cmpib #'\r',%d7
3559+
jne L(console_not_lf_not_cr)
35603560
clrl %a0@(Lconsole_struct_cur_column)
35613561
jra L(console_exit)
35623562

3563-
L(console_not_cr):
3564-
cmpib #1,%d7
3565-
jne L(console_not_home)
3566-
clrl %a0@(Lconsole_struct_cur_row)
3567-
clrl %a0@(Lconsole_struct_cur_column)
3568-
jra L(console_exit)
3569-
3570-
/*
3571-
* At this point we know that the %d7 character is going to be
3572-
* rendered on the screen. Register usage is -
3573-
* a0 = pointer to console globals
3574-
* a1 = font data
3575-
* d0 = cursor column
3576-
* d1 = cursor row to draw the character
3577-
* d7 = character number
3578-
*/
3579-
L(console_not_home):
3563+
/*
3564+
* At this point we know that the %d7 character is going to be
3565+
* rendered on the screen. Register usage is -
3566+
* a0 = pointer to console globals
3567+
* a1 = font data
3568+
* d0 = cursor column
3569+
* d1 = cursor row to draw the character
3570+
* d7 = character number
3571+
*/
3572+
L(console_not_lf_not_cr):
35803573
movel %a0@(Lconsole_struct_cur_column),%d0
35813574
movel %a0@(Lconsole_struct_cur_row),%d1
35823575

0 commit comments

Comments
 (0)