Skip to content

Commit

Permalink
s390/cio: fix error-prone defines
Browse files Browse the repository at this point in the history
Missing parenthesis may cause problems when using the defines
together with operations of higher precedence.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Peter Oberparleiter authored and Martin Schwidefsky committed Oct 24, 2013
1 parent 5895294 commit 8a80b10
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions arch/s390/include/asm/fcx.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#define TCW_FORMAT_DEFAULT 0
#define TCW_TIDAW_FORMAT_DEFAULT 0
#define TCW_FLAGS_INPUT_TIDA 1 << (23 - 5)
#define TCW_FLAGS_TCCB_TIDA 1 << (23 - 6)
#define TCW_FLAGS_OUTPUT_TIDA 1 << (23 - 7)
#define TCW_FLAGS_INPUT_TIDA (1 << (23 - 5))
#define TCW_FLAGS_TCCB_TIDA (1 << (23 - 6))
#define TCW_FLAGS_OUTPUT_TIDA (1 << (23 - 7))
#define TCW_FLAGS_TIDAW_FORMAT(x) ((x) & 3) << (23 - 9)
#define TCW_FLAGS_GET_TIDAW_FORMAT(x) (((x) >> (23 - 9)) & 3)

Expand Down Expand Up @@ -54,11 +54,11 @@ struct tcw {
u32 intrg;
} __attribute__ ((packed, aligned(64)));

#define TIDAW_FLAGS_LAST 1 << (7 - 0)
#define TIDAW_FLAGS_SKIP 1 << (7 - 1)
#define TIDAW_FLAGS_DATA_INT 1 << (7 - 2)
#define TIDAW_FLAGS_TTIC 1 << (7 - 3)
#define TIDAW_FLAGS_INSERT_CBC 1 << (7 - 4)
#define TIDAW_FLAGS_LAST (1 << (7 - 0))
#define TIDAW_FLAGS_SKIP (1 << (7 - 1))
#define TIDAW_FLAGS_DATA_INT (1 << (7 - 2))
#define TIDAW_FLAGS_TTIC (1 << (7 - 3))
#define TIDAW_FLAGS_INSERT_CBC (1 << (7 - 4))

/**
* struct tidaw - Transport-Indirect-Addressing Word (TIDAW)
Expand Down Expand Up @@ -106,9 +106,9 @@ struct tsa_ddpc {
u8 sense[32];
} __attribute__ ((packed));

#define TSA_INTRG_FLAGS_CU_STATE_VALID 1 << (7 - 0)
#define TSA_INTRG_FLAGS_DEV_STATE_VALID 1 << (7 - 1)
#define TSA_INTRG_FLAGS_OP_STATE_VALID 1 << (7 - 2)
#define TSA_INTRG_FLAGS_CU_STATE_VALID (1 << (7 - 0))
#define TSA_INTRG_FLAGS_DEV_STATE_VALID (1 << (7 - 1))
#define TSA_INTRG_FLAGS_OP_STATE_VALID (1 << (7 - 2))

/**
* struct tsa_intrg - Interrogate Transport-Status Area (Intrg. TSA)
Expand Down Expand Up @@ -140,10 +140,10 @@ struct tsa_intrg {
#define TSB_FORMAT_DDPC 2
#define TSB_FORMAT_INTRG 3

#define TSB_FLAGS_DCW_OFFSET_VALID 1 << (7 - 0)
#define TSB_FLAGS_COUNT_VALID 1 << (7 - 1)
#define TSB_FLAGS_CACHE_MISS 1 << (7 - 2)
#define TSB_FLAGS_TIME_VALID 1 << (7 - 3)
#define TSB_FLAGS_DCW_OFFSET_VALID (1 << (7 - 0))
#define TSB_FLAGS_COUNT_VALID (1 << (7 - 1))
#define TSB_FLAGS_CACHE_MISS (1 << (7 - 2))
#define TSB_FLAGS_TIME_VALID (1 << (7 - 3))
#define TSB_FLAGS_FORMAT(x) ((x) & 7)
#define TSB_FORMAT(t) ((t)->flags & 7)

Expand Down Expand Up @@ -179,9 +179,9 @@ struct tsb {
#define DCW_INTRG_RCQ_PRIMARY 1
#define DCW_INTRG_RCQ_SECONDARY 2

#define DCW_INTRG_FLAGS_MPM 1 < (7 - 0)
#define DCW_INTRG_FLAGS_PPR 1 < (7 - 1)
#define DCW_INTRG_FLAGS_CRIT 1 < (7 - 2)
#define DCW_INTRG_FLAGS_MPM (1 << (7 - 0))
#define DCW_INTRG_FLAGS_PPR (1 << (7 - 1))
#define DCW_INTRG_FLAGS_CRIT (1 << (7 - 2))

/**
* struct dcw_intrg_data - Interrogate DCW data
Expand Down Expand Up @@ -216,7 +216,7 @@ struct dcw_intrg_data {
u8 prog_data[0];
} __attribute__ ((packed));

#define DCW_FLAGS_CC 1 << (7 - 1)
#define DCW_FLAGS_CC (1 << (7 - 1))

#define DCW_CMD_WRITE 0x01
#define DCW_CMD_READ 0x02
Expand Down

0 comments on commit 8a80b10

Please sign in to comment.