Skip to content

Commit baa75af

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: target: Shorten ALUA error messages
Do not print tg_pt_gp->tg_pt_gp_valid_id if we already know that it is zero. Link: https://lore.kernel.org/r/[email protected] Cc: Mike Christie <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent e15c745 commit baa75af

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

drivers/target/target_core_configfs.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,8 +2745,7 @@ static ssize_t target_tg_pt_gp_alua_access_state_store(struct config_item *item,
27452745
int new_state, ret;
27462746

27472747
if (!tg_pt_gp->tg_pt_gp_valid_id) {
2748-
pr_err("Unable to do implicit ALUA on non valid"
2749-
" tg_pt_gp ID: %hu\n", tg_pt_gp->tg_pt_gp_valid_id);
2748+
pr_err("Unable to do implicit ALUA on invalid tg_pt_gp ID\n");
27502749
return -EINVAL;
27512750
}
27522751
if (!target_dev_configured(dev)) {
@@ -2797,9 +2796,7 @@ static ssize_t target_tg_pt_gp_alua_access_status_store(
27972796
int new_status, ret;
27982797

27992798
if (!tg_pt_gp->tg_pt_gp_valid_id) {
2800-
pr_err("Unable to do set ALUA access status on non"
2801-
" valid tg_pt_gp ID: %hu\n",
2802-
tg_pt_gp->tg_pt_gp_valid_id);
2799+
pr_err("Unable to set ALUA access status on invalid tg_pt_gp ID\n");
28032800
return -EINVAL;
28042801
}
28052802

@@ -2852,9 +2849,7 @@ static ssize_t target_tg_pt_gp_alua_support_##_name##_store( \
28522849
int ret; \
28532850
\
28542851
if (!t->tg_pt_gp_valid_id) { \
2855-
pr_err("Unable to do set " #_name " ALUA state on non" \
2856-
" valid tg_pt_gp ID: %hu\n", \
2857-
t->tg_pt_gp_valid_id); \
2852+
pr_err("Unable to set " #_name " ALUA state on invalid tg_pt_gp ID\n"); \
28582853
return -EINVAL; \
28592854
} \
28602855
\

0 commit comments

Comments
 (0)