Skip to content

Commit cd956a5

Browse files
tobluxtsbogend
authored andcommitted
mips: ptrace: Improve code formatting and indentation
Use tabs instead of spaces in regs_query_register_offset() and syscall_trace_leave(), and properly indent multiple getters. Signed-off-by: Thorsten Blum <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 76c43eb commit cd956a5

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

arch/mips/kernel/ptrace.c

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -922,11 +922,13 @@ static const struct pt_regs_offset regoffset_table[] = {
922922
*/
923923
int regs_query_register_offset(const char *name)
924924
{
925-
const struct pt_regs_offset *roff;
926-
for (roff = regoffset_table; roff->name != NULL; roff++)
927-
if (!strcmp(roff->name, name))
928-
return roff->offset;
929-
return -EINVAL;
925+
const struct pt_regs_offset *roff;
926+
927+
for (roff = regoffset_table; roff->name != NULL; roff++)
928+
if (!strcmp(roff->name, name))
929+
return roff->offset;
930+
931+
return -EINVAL;
930932
}
931933

932934
#if defined(CONFIG_32BIT) || defined(CONFIG_MIPS32_O32)
@@ -937,15 +939,15 @@ static const struct user_regset mips_regsets[] = {
937939
.n = ELF_NGREG,
938940
.size = sizeof(unsigned int),
939941
.align = sizeof(unsigned int),
940-
.regset_get = gpr32_get,
942+
.regset_get = gpr32_get,
941943
.set = gpr32_set,
942944
},
943945
[REGSET_DSP] = {
944946
.core_note_type = NT_MIPS_DSP,
945947
.n = NUM_DSP_REGS + 1,
946948
.size = sizeof(u32),
947949
.align = sizeof(u32),
948-
.regset_get = dsp32_get,
950+
.regset_get = dsp32_get,
949951
.set = dsp32_set,
950952
.active = dsp_active,
951953
},
@@ -955,15 +957,15 @@ static const struct user_regset mips_regsets[] = {
955957
.n = ELF_NFPREG,
956958
.size = sizeof(elf_fpreg_t),
957959
.align = sizeof(elf_fpreg_t),
958-
.regset_get = fpr_get,
960+
.regset_get = fpr_get,
959961
.set = fpr_set,
960962
},
961963
[REGSET_FP_MODE] = {
962964
.core_note_type = NT_MIPS_FP_MODE,
963965
.n = 1,
964966
.size = sizeof(int),
965967
.align = sizeof(int),
966-
.regset_get = fp_mode_get,
968+
.regset_get = fp_mode_get,
967969
.set = fp_mode_set,
968970
},
969971
#endif
@@ -973,7 +975,7 @@ static const struct user_regset mips_regsets[] = {
973975
.n = NUM_FPU_REGS + 1,
974976
.size = 16,
975977
.align = 16,
976-
.regset_get = msa_get,
978+
.regset_get = msa_get,
977979
.set = msa_set,
978980
},
979981
#endif
@@ -997,15 +999,15 @@ static const struct user_regset mips64_regsets[] = {
997999
.n = ELF_NGREG,
9981000
.size = sizeof(unsigned long),
9991001
.align = sizeof(unsigned long),
1000-
.regset_get = gpr64_get,
1002+
.regset_get = gpr64_get,
10011003
.set = gpr64_set,
10021004
},
10031005
[REGSET_DSP] = {
10041006
.core_note_type = NT_MIPS_DSP,
10051007
.n = NUM_DSP_REGS + 1,
10061008
.size = sizeof(u64),
10071009
.align = sizeof(u64),
1008-
.regset_get = dsp64_get,
1010+
.regset_get = dsp64_get,
10091011
.set = dsp64_set,
10101012
.active = dsp_active,
10111013
},
@@ -1015,15 +1017,15 @@ static const struct user_regset mips64_regsets[] = {
10151017
.n = 1,
10161018
.size = sizeof(int),
10171019
.align = sizeof(int),
1018-
.regset_get = fp_mode_get,
1020+
.regset_get = fp_mode_get,
10191021
.set = fp_mode_set,
10201022
},
10211023
[REGSET_FPR] = {
10221024
.core_note_type = NT_PRFPREG,
10231025
.n = ELF_NFPREG,
10241026
.size = sizeof(elf_fpreg_t),
10251027
.align = sizeof(elf_fpreg_t),
1026-
.regset_get = fpr_get,
1028+
.regset_get = fpr_get,
10271029
.set = fpr_set,
10281030
},
10291031
#endif
@@ -1033,7 +1035,7 @@ static const struct user_regset mips64_regsets[] = {
10331035
.n = NUM_FPU_REGS + 1,
10341036
.size = 16,
10351037
.align = 16,
1036-
.regset_get = msa_get,
1038+
.regset_get = msa_get,
10371039
.set = msa_set,
10381040
},
10391041
#endif
@@ -1351,7 +1353,7 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs)
13511353
*/
13521354
asmlinkage void syscall_trace_leave(struct pt_regs *regs)
13531355
{
1354-
/*
1356+
/*
13551357
* We may come here right after calling schedule_user()
13561358
* or do_notify_resume(), in which case we can be in RCU
13571359
* user mode.

0 commit comments

Comments
 (0)