Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bb3a104 authored by Maurizio Lombardi's avatar Maurizio Lombardi Committed by Greg Kroah-Hartman
Browse files

scsi: target: iscsi: Fix an error message in iscsi_check_key()

[ Upstream commit 6cc55c969b7ce8d85e09a636693d4126c3676c11 ]

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/20230214141556.762047-1-mlombard@redhat.com


Signed-off-by: default avatarMaurizio Lombardi <mlombard@redhat.com>
Reviewed-by: default avatarMike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f55cb52e
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -1270,18 +1270,20 @@ static struct iscsi_param *iscsi_check_key(
		return param;

	if (!(param->phase & phase)) {
		pr_err("Key \"%s\" may not be negotiated during ",
				param->name);
		char *phase_name;

		switch (phase) {
		case PHASE_SECURITY:
			pr_debug("Security phase.\n");
			phase_name = "Security";
			break;
		case PHASE_OPERATIONAL:
			pr_debug("Operational phase.\n");
			phase_name = "Operational";
			break;
		default:
			pr_debug("Unknown phase.\n");
			phase_name = "Unknown";
		}
		pr_err("Key \"%s\" may not be negotiated during %s phase.\n",
				param->name, phase_name);
		return NULL;
	}