OSDN Git Service

scsi: zfcp: the action field of zfcp_erp_action is actually the type
authorSteffen Maier <maier@linux.ibm.com>
Thu, 8 Nov 2018 14:44:50 +0000 (15:44 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 15 Nov 2018 20:01:18 +0000 (15:01 -0500)
commitdf91eefd080dcd9801145d1c210d3b078cf912b1
tree8e8d81788627ee5a7f2820286b8650e255c4077b
parent208d096154da8457ee73ddbb490d48cb07abcb20
scsi: zfcp: the action field of zfcp_erp_action is actually the type

&zfcp_erp_action.action ==> &zfcp_erp_action.type

While at it, make use of the already defined enum for this purpose to get
at least some build checking (even though an enum is type equivalent to an
int in C). v2.6.27 commit 287ac01acf22 ("[SCSI] zfcp: Cleanup code in
zfcp_erp.c") introduced the enum which was cpp defines previously.

To prevent compiler warnings with the switch(act->type), we have to
separate the recently added eyecatchers from enum zfcp_erp_act_type.

Since struct zfcp_erp_action type is embedded into other structures living
in zfcp_def.h, we have to move enum zfcp_erp_act_type from its private
definition in zfcp_erp.c to the zfcp-global zfcp_def.h.

Silence one false -Wswitch compiler warning case: LUNs as the leaves in our
object tree do not have any follow-up success recovery.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/s390/scsi/zfcp_dbf.c
drivers/s390/scsi/zfcp_def.h
drivers/s390/scsi/zfcp_erp.c