Skip to content

Commit 62e1dfa

Browse files
hbruecknerborkmann
authored andcommitted
s390/uapi: correct whitespace & coding style in asm/ptrace.h
Correct whitespace and coding style issues in the s390 asm/ptrace.h uapi header file. This is preparatory work to copy it to the tools/ directory for inclusion by selftests and perf. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent a39cada commit 62e1dfa

File tree

1 file changed

+52
-66
lines changed

1 file changed

+52
-66
lines changed

arch/s390/include/uapi/asm/ptrace.h

Lines changed: 52 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
#define GPR_SIZE 8
163163
#define CR_SIZE 8
164164

165-
#define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */
165+
#define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */
166166

167167
#endif /* __s390x__ */
168168

@@ -179,41 +179,38 @@
179179
#define ACR_SIZE 4
180180

181181

182-
#define PTRACE_OLDSETOPTIONS 21
182+
#define PTRACE_OLDSETOPTIONS 21
183183

184184
#ifndef __ASSEMBLY__
185185
#include <linux/stddef.h>
186186
#include <linux/types.h>
187187

188-
typedef union
189-
{
190-
float f;
191-
double d;
192-
__u64 ui;
188+
typedef union {
189+
float f;
190+
double d;
191+
__u64 ui;
193192
struct
194193
{
195194
__u32 hi;
196195
__u32 lo;
197196
} fp;
198197
} freg_t;
199198

200-
typedef struct
201-
{
202-
__u32 fpc;
199+
typedef struct {
200+
__u32 fpc;
203201
__u32 pad;
204-
freg_t fprs[NUM_FPRS];
202+
freg_t fprs[NUM_FPRS];
205203
} s390_fp_regs;
206204

207-
#define FPC_EXCEPTION_MASK 0xF8000000
208-
#define FPC_FLAGS_MASK 0x00F80000
209-
#define FPC_DXC_MASK 0x0000FF00
210-
#define FPC_RM_MASK 0x00000003
205+
#define FPC_EXCEPTION_MASK 0xF8000000
206+
#define FPC_FLAGS_MASK 0x00F80000
207+
#define FPC_DXC_MASK 0x0000FF00
208+
#define FPC_RM_MASK 0x00000003
211209

212210
/* this typedef defines how a Program Status Word looks like */
213-
typedef struct
214-
{
215-
unsigned long mask;
216-
unsigned long addr;
211+
typedef struct {
212+
unsigned long mask;
213+
unsigned long addr;
217214
} __attribute__ ((aligned(8))) psw_t;
218215

219216
#ifndef __s390x__
@@ -282,8 +279,7 @@ typedef struct
282279
/*
283280
* The s390_regs structure is used to define the elf_gregset_t.
284281
*/
285-
typedef struct
286-
{
282+
typedef struct {
287283
psw_t psw;
288284
unsigned long gprs[NUM_GPRS];
289285
unsigned int acrs[NUM_ACRS];
@@ -294,8 +290,7 @@ typedef struct
294290
* The user_pt_regs structure exports the beginning of
295291
* the in-kernel pt_regs structure to user space.
296292
*/
297-
typedef struct
298-
{
293+
typedef struct {
299294
unsigned long args[1];
300295
psw_t psw;
301296
unsigned long gprs[NUM_GPRS];
@@ -307,19 +302,17 @@ typedef struct
307302
* touch or even look at it if you don't want to modify the user-space
308303
* ptrace interface. In particular stay away from it for in-kernel PER.
309304
*/
310-
typedef struct
311-
{
305+
typedef struct {
312306
unsigned long cr[NUM_CR_WORDS];
313307
} per_cr_words;
314308

315309
#define PER_EM_MASK 0xE8000000UL
316310

317-
typedef struct
318-
{
311+
typedef struct {
319312
#ifdef __s390x__
320-
unsigned : 32;
313+
unsigned : 32;
321314
#endif /* __s390x__ */
322-
unsigned em_branching : 1;
315+
unsigned em_branching : 1;
323316
unsigned em_instruction_fetch : 1;
324317
/*
325318
* Switching on storage alteration automatically fixes
@@ -328,44 +321,41 @@ typedef struct
328321
unsigned em_storage_alteration : 1;
329322
unsigned em_gpr_alt_unused : 1;
330323
unsigned em_store_real_address : 1;
331-
unsigned : 3;
324+
unsigned : 3;
332325
unsigned branch_addr_ctl : 1;
333-
unsigned : 1;
326+
unsigned : 1;
334327
unsigned storage_alt_space_ctl : 1;
335-
unsigned : 21;
328+
unsigned : 21;
336329
unsigned long starting_addr;
337330
unsigned long ending_addr;
338331
} per_cr_bits;
339332

340-
typedef struct
341-
{
333+
typedef struct {
342334
unsigned short perc_atmid;
343335
unsigned long address;
344336
unsigned char access_id;
345337
} per_lowcore_words;
346338

347-
typedef struct
348-
{
349-
unsigned perc_branching : 1;
339+
typedef struct {
340+
unsigned perc_branching : 1;
350341
unsigned perc_instruction_fetch : 1;
351342
unsigned perc_storage_alteration : 1;
352-
unsigned perc_gpr_alt_unused : 1;
343+
unsigned perc_gpr_alt_unused : 1;
353344
unsigned perc_store_real_address : 1;
354-
unsigned : 3;
355-
unsigned atmid_psw_bit_31 : 1;
356-
unsigned atmid_validity_bit : 1;
357-
unsigned atmid_psw_bit_32 : 1;
358-
unsigned atmid_psw_bit_5 : 1;
359-
unsigned atmid_psw_bit_16 : 1;
360-
unsigned atmid_psw_bit_17 : 1;
361-
unsigned si : 2;
345+
unsigned : 3;
346+
unsigned atmid_psw_bit_31 : 1;
347+
unsigned atmid_validity_bit : 1;
348+
unsigned atmid_psw_bit_32 : 1;
349+
unsigned atmid_psw_bit_5 : 1;
350+
unsigned atmid_psw_bit_16 : 1;
351+
unsigned atmid_psw_bit_17 : 1;
352+
unsigned si : 2;
362353
unsigned long address;
363-
unsigned : 4;
364-
unsigned access_id : 4;
354+
unsigned : 4;
355+
unsigned access_id : 4;
365356
} per_lowcore_bits;
366357

367-
typedef struct
368-
{
358+
typedef struct {
369359
union {
370360
per_cr_words words;
371361
per_cr_bits bits;
@@ -375,9 +365,9 @@ typedef struct
375365
* the kernel always sets them to zero. To enable single
376366
* stepping use ptrace(PTRACE_SINGLESTEP) instead.
377367
*/
378-
unsigned single_step : 1;
368+
unsigned single_step : 1;
379369
unsigned instruction_fetch : 1;
380-
unsigned : 30;
370+
unsigned : 30;
381371
/*
382372
* These addresses are copied into cr10 & cr11 if single
383373
* stepping is switched off
@@ -387,11 +377,10 @@ typedef struct
387377
union {
388378
per_lowcore_words words;
389379
per_lowcore_bits bits;
390-
} lowcore;
380+
} lowcore;
391381
} per_struct;
392382

393-
typedef struct
394-
{
383+
typedef struct {
395384
unsigned int len;
396385
unsigned long kernel_addr;
397386
unsigned long process_addr;
@@ -401,12 +390,12 @@ typedef struct
401390
* S/390 specific non posix ptrace requests. I chose unusual values so
402391
* they are unlikely to clash with future ptrace definitions.
403392
*/
404-
#define PTRACE_PEEKUSR_AREA 0x5000
405-
#define PTRACE_POKEUSR_AREA 0x5001
393+
#define PTRACE_PEEKUSR_AREA 0x5000
394+
#define PTRACE_POKEUSR_AREA 0x5001
406395
#define PTRACE_PEEKTEXT_AREA 0x5002
407396
#define PTRACE_PEEKDATA_AREA 0x5003
408397
#define PTRACE_POKETEXT_AREA 0x5004
409-
#define PTRACE_POKEDATA_AREA 0x5005
398+
#define PTRACE_POKEDATA_AREA 0x5005
410399
#define PTRACE_GET_LAST_BREAK 0x5006
411400
#define PTRACE_PEEK_SYSTEM_CALL 0x5007
412401
#define PTRACE_POKE_SYSTEM_CALL 0x5008
@@ -424,21 +413,19 @@ typedef struct
424413
* PT_PROT definition is loosely based on hppa bsd definition in
425414
* gdb/hppab-nat.c
426415
*/
427-
#define PTRACE_PROT 21
416+
#define PTRACE_PROT 21
428417

429-
typedef enum
430-
{
418+
typedef enum {
431419
ptprot_set_access_watchpoint,
432420
ptprot_set_write_watchpoint,
433421
ptprot_disable_watchpoint
434422
} ptprot_flags;
435423

436-
typedef struct
437-
{
424+
typedef struct {
438425
unsigned long lowaddr;
439426
unsigned long hiaddr;
440427
ptprot_flags prot;
441-
} ptprot_area;
428+
} ptprot_area;
442429

443430
/* Sequence of bytes for breakpoint illegal instruction. */
444431
#define S390_BREAKPOINT {0x0,0x1}
@@ -450,8 +437,7 @@ typedef struct
450437
* The user_regs_struct defines the way the user registers are
451438
* store on the stack for signal handling.
452439
*/
453-
struct user_regs_struct
454-
{
440+
struct user_regs_struct {
455441
psw_t psw;
456442
unsigned long gprs[NUM_GPRS];
457443
unsigned int acrs[NUM_ACRS];

0 commit comments

Comments
 (0)