diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2014-05-07 07:27:21 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-05-20 02:58:53 -0400 |
commit | 2bf29df7460f4038f84ac5dea3cbe582d6d4af82 (patch) | |
tree | f3c8fc9a1199da5a2d0426cc509d145097c22894 | |
parent | 2e4006b34d06681ed95d55510d4450f29a13c417 (diff) |
s390/cio: fix multiple structure definitions
Fix multiple definitions of struct channel_path_desc by moving it
to asm/chpid.h . Also change ccw_device_get_chp_desc to use proper
types.
Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/include/asm/ccwdev.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/chpid.h | 11 | ||||
-rw-r--r-- | drivers/s390/cio/chp.c | 2 | ||||
-rw-r--r-- | drivers/s390/cio/chp.h | 2 | ||||
-rw-r--r-- | drivers/s390/cio/chsc.h | 11 | ||||
-rw-r--r-- | drivers/s390/cio/device_ops.c | 13 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 12 |
7 files changed, 27 insertions, 26 deletions
diff --git a/arch/s390/include/asm/ccwdev.h b/arch/s390/include/asm/ccwdev.h index a9c2c0686177..b80e456d6428 100644 --- a/arch/s390/include/asm/ccwdev.h +++ b/arch/s390/include/asm/ccwdev.h | |||
@@ -229,5 +229,5 @@ int ccw_device_siosl(struct ccw_device *); | |||
229 | 229 | ||
230 | extern void ccw_device_get_schid(struct ccw_device *, struct subchannel_id *); | 230 | extern void ccw_device_get_schid(struct ccw_device *, struct subchannel_id *); |
231 | 231 | ||
232 | extern void *ccw_device_get_chp_desc(struct ccw_device *, int); | 232 | struct channel_path_desc *ccw_device_get_chp_desc(struct ccw_device *, int); |
233 | #endif /* _S390_CCWDEV_H_ */ | 233 | #endif /* _S390_CCWDEV_H_ */ |
diff --git a/arch/s390/include/asm/chpid.h b/arch/s390/include/asm/chpid.h index 38c405ef89ce..7298eec98541 100644 --- a/arch/s390/include/asm/chpid.h +++ b/arch/s390/include/asm/chpid.h | |||
@@ -8,6 +8,17 @@ | |||
8 | #include <uapi/asm/chpid.h> | 8 | #include <uapi/asm/chpid.h> |
9 | #include <asm/cio.h> | 9 | #include <asm/cio.h> |
10 | 10 | ||
11 | struct channel_path_desc { | ||
12 | u8 flags; | ||
13 | u8 lsn; | ||
14 | u8 desc; | ||
15 | u8 chpid; | ||
16 | u8 swla; | ||
17 | u8 zeroes; | ||
18 | u8 chla; | ||
19 | u8 chpp; | ||
20 | } __packed; | ||
21 | |||
11 | static inline void chp_id_init(struct chp_id *chpid) | 22 | static inline void chp_id_init(struct chp_id *chpid) |
12 | { | 23 | { |
13 | memset(chpid, 0, sizeof(struct chp_id)); | 24 | memset(chpid, 0, sizeof(struct chp_id)); |
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index 6c440d4349d4..d497aa05a72f 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c | |||
@@ -509,7 +509,7 @@ out: | |||
509 | * On success return a newly allocated copy of the channel-path description | 509 | * On success return a newly allocated copy of the channel-path description |
510 | * data associated with the given channel-path ID. Return %NULL on error. | 510 | * data associated with the given channel-path ID. Return %NULL on error. |
511 | */ | 511 | */ |
512 | void *chp_get_chp_desc(struct chp_id chpid) | 512 | struct channel_path_desc *chp_get_chp_desc(struct chp_id chpid) |
513 | { | 513 | { |
514 | struct channel_path *chp; | 514 | struct channel_path *chp; |
515 | struct channel_path_desc *desc; | 515 | struct channel_path_desc *desc; |
diff --git a/drivers/s390/cio/chp.h b/drivers/s390/cio/chp.h index 9284b785a06f..4efd5b867cc3 100644 --- a/drivers/s390/cio/chp.h +++ b/drivers/s390/cio/chp.h | |||
@@ -60,7 +60,7 @@ static inline struct channel_path *chpid_to_chp(struct chp_id chpid) | |||
60 | int chp_get_status(struct chp_id chpid); | 60 | int chp_get_status(struct chp_id chpid); |
61 | u8 chp_get_sch_opm(struct subchannel *sch); | 61 | u8 chp_get_sch_opm(struct subchannel *sch); |
62 | int chp_is_registered(struct chp_id chpid); | 62 | int chp_is_registered(struct chp_id chpid); |
63 | void *chp_get_chp_desc(struct chp_id chpid); | 63 | struct channel_path_desc *chp_get_chp_desc(struct chp_id chpid); |
64 | void chp_remove_cmg_attr(struct channel_path *chp); | 64 | void chp_remove_cmg_attr(struct channel_path *chp); |
65 | int chp_add_cmg_attr(struct channel_path *chp); | 65 | int chp_add_cmg_attr(struct channel_path *chp); |
66 | int chp_update_desc(struct channel_path *chp); | 66 | int chp_update_desc(struct channel_path *chp); |
diff --git a/drivers/s390/cio/chsc.h b/drivers/s390/cio/chsc.h index 7e53a9c8b0b9..76c9b50700b2 100644 --- a/drivers/s390/cio/chsc.h +++ b/drivers/s390/cio/chsc.h | |||
@@ -21,17 +21,6 @@ struct cmg_entry { | |||
21 | u32 values[NR_MEASUREMENT_ENTRIES]; | 21 | u32 values[NR_MEASUREMENT_ENTRIES]; |
22 | } __attribute__ ((packed)); | 22 | } __attribute__ ((packed)); |
23 | 23 | ||
24 | struct channel_path_desc { | ||
25 | u8 flags; | ||
26 | u8 lsn; | ||
27 | u8 desc; | ||
28 | u8 chpid; | ||
29 | u8 swla; | ||
30 | u8 zeroes; | ||
31 | u8 chla; | ||
32 | u8 chpp; | ||
33 | } __attribute__ ((packed)); | ||
34 | |||
35 | struct channel_path_desc_fmt1 { | 24 | struct channel_path_desc_fmt1 { |
36 | u8 flags; | 25 | u8 flags; |
37 | u8 lsn; | 26 | u8 lsn; |
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 4845d64f2842..f3c417943dad 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -563,14 +563,23 @@ out_unlock: | |||
563 | return rc; | 563 | return rc; |
564 | } | 564 | } |
565 | 565 | ||
566 | void *ccw_device_get_chp_desc(struct ccw_device *cdev, int chp_no) | 566 | /** |
567 | * chp_get_chp_desc - return newly allocated channel-path descriptor | ||
568 | * @cdev: device to obtain the descriptor for | ||
569 | * @chp_idx: index of the channel path | ||
570 | * | ||
571 | * On success return a newly allocated copy of the channel-path description | ||
572 | * data associated with the given channel path. Return %NULL on error. | ||
573 | */ | ||
574 | struct channel_path_desc *ccw_device_get_chp_desc(struct ccw_device *cdev, | ||
575 | int chp_idx) | ||
567 | { | 576 | { |
568 | struct subchannel *sch; | 577 | struct subchannel *sch; |
569 | struct chp_id chpid; | 578 | struct chp_id chpid; |
570 | 579 | ||
571 | sch = to_subchannel(cdev->dev.parent); | 580 | sch = to_subchannel(cdev->dev.parent); |
572 | chp_id_init(&chpid); | 581 | chp_id_init(&chpid); |
573 | chpid.id = sch->schib.pmcw.chpid[chp_no]; | 582 | chpid.id = sch->schib.pmcw.chpid[chp_idx]; |
574 | return chp_get_chp_desc(chpid); | 583 | return chp_get_chp_desc(chpid); |
575 | } | 584 | } |
576 | 585 | ||
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 22470a3b182f..e89f38c31176 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <net/iucv/af_iucv.h> | 22 | #include <net/iucv/af_iucv.h> |
23 | 23 | ||
24 | #include <asm/ebcdic.h> | 24 | #include <asm/ebcdic.h> |
25 | #include <asm/chpid.h> | ||
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
26 | #include <asm/sysinfo.h> | 27 | #include <asm/sysinfo.h> |
27 | #include <asm/compat.h> | 28 | #include <asm/compat.h> |
@@ -1344,16 +1345,7 @@ static void qeth_set_multiple_write_queues(struct qeth_card *card) | |||
1344 | static void qeth_update_from_chp_desc(struct qeth_card *card) | 1345 | static void qeth_update_from_chp_desc(struct qeth_card *card) |
1345 | { | 1346 | { |
1346 | struct ccw_device *ccwdev; | 1347 | struct ccw_device *ccwdev; |
1347 | struct channelPath_dsc { | 1348 | struct channel_path_desc *chp_dsc; |
1348 | u8 flags; | ||
1349 | u8 lsn; | ||
1350 | u8 desc; | ||
1351 | u8 chpid; | ||
1352 | u8 swla; | ||
1353 | u8 zeroes; | ||
1354 | u8 chla; | ||
1355 | u8 chpp; | ||
1356 | } *chp_dsc; | ||
1357 | 1349 | ||
1358 | QETH_DBF_TEXT(SETUP, 2, "chp_desc"); | 1350 | QETH_DBF_TEXT(SETUP, 2, "chp_desc"); |
1359 | 1351 | ||