Skip to contentSkip to conversation

zfcp: the action field of zfcp_erp_action is actually the type

PATCH Hannes Reinecke 1 participant 1 message Nov 16, 2018 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Hannes Reinecke

author Reviewed-by
#1 lore raw
Quoted 17 lines · Steffen Maier

&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.

Quoted 8 lines
---
  drivers/s390/scsi/zfcp_dbf.c |  2 +-
  drivers/s390/scsi/zfcp_def.h | 20 +++++++++++-
  drivers/s390/scsi/zfcp_erp.c | 77 +++++++++++++++++++++-----------------------
  3 files changed, 56 insertions(+), 43 deletions(-)

Cheers,

Hannes

Signature · 5 lines
Dr. Hannes Reinecke		   Teamlead Storage & Networking
[email protected]			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg
GF: F. Imend�rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG N�rnberg)