hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/target/iscsi/iscsi_target_parameters.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*******************************************************************************
23 * This file contains main functions related to iSCSI Parameter negotiation.
34 *
....@@ -5,15 +6,6 @@
56 *
67 * Author: Nicholas A. Bellinger <nab@linux-iscsi.org>
78 *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
179 ******************************************************************************/
1810
1911 #include <linux/slab.h>
....@@ -1270,18 +1262,20 @@
12701262 return param;
12711263
12721264 if (!(param->phase & phase)) {
1273
- pr_err("Key \"%s\" may not be negotiated during ",
1274
- param->name);
1265
+ char *phase_name;
1266
+
12751267 switch (phase) {
12761268 case PHASE_SECURITY:
1277
- pr_debug("Security phase.\n");
1269
+ phase_name = "Security";
12781270 break;
12791271 case PHASE_OPERATIONAL:
1280
- pr_debug("Operational phase.\n");
1272
+ phase_name = "Operational";
12811273 break;
12821274 default:
1283
- pr_debug("Unknown phase.\n");
1275
+ phase_name = "Unknown";
12841276 }
1277
+ pr_err("Key \"%s\" may not be negotiated during %s phase.\n",
1278
+ param->name, phase_name);
12851279 return NULL;
12861280 }
12871281