Skip to content

Commit 6cc55c9

Browse files
maurizio-lombardimartinkpetersen
authored andcommitted
scsi: target: iscsi: Fix an error message in iscsi_check_key()
The first half of the error message is printed by pr_err(), the second half is printed by pr_debug(). The user will therefore see only the first part of the message and will miss some useful information. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maurizio Lombardi <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent fe15c26 commit 6cc55c9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

drivers/target/iscsi/iscsi_target_parameters.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,18 +1262,20 @@ static struct iscsi_param *iscsi_check_key(
12621262
return param;
12631263

12641264
if (!(param->phase & phase)) {
1265-
pr_err("Key \"%s\" may not be negotiated during ",
1266-
param->name);
1265+
char *phase_name;
1266+
12671267
switch (phase) {
12681268
case PHASE_SECURITY:
1269-
pr_debug("Security phase.\n");
1269+
phase_name = "Security";
12701270
break;
12711271
case PHASE_OPERATIONAL:
1272-
pr_debug("Operational phase.\n");
1272+
phase_name = "Operational";
12731273
break;
12741274
default:
1275-
pr_debug("Unknown phase.\n");
1275+
phase_name = "Unknown";
12761276
}
1277+
pr_err("Key \"%s\" may not be negotiated during %s phase.\n",
1278+
param->name, phase_name);
12771279
return NULL;
12781280
}
12791281

0 commit comments

Comments
 (0)