Commit baa75afd authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

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/20210415220826.29438-20-bvanassche@acm.org
Cc: Mike Christie <michael.christie@oracle.com>
Reviewed-by: default avatarMike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e15c7452
...@@ -2745,8 +2745,7 @@ static ssize_t target_tg_pt_gp_alua_access_state_store(struct config_item *item, ...@@ -2745,8 +2745,7 @@ static ssize_t target_tg_pt_gp_alua_access_state_store(struct config_item *item,
int new_state, ret; int new_state, ret;
if (!tg_pt_gp->tg_pt_gp_valid_id) { if (!tg_pt_gp->tg_pt_gp_valid_id) {
pr_err("Unable to do implicit ALUA on non valid" pr_err("Unable to do implicit ALUA on invalid tg_pt_gp ID\n");
" tg_pt_gp ID: %hu\n", tg_pt_gp->tg_pt_gp_valid_id);
return -EINVAL; return -EINVAL;
} }
if (!target_dev_configured(dev)) { if (!target_dev_configured(dev)) {
...@@ -2797,9 +2796,7 @@ static ssize_t target_tg_pt_gp_alua_access_status_store( ...@@ -2797,9 +2796,7 @@ static ssize_t target_tg_pt_gp_alua_access_status_store(
int new_status, ret; int new_status, ret;
if (!tg_pt_gp->tg_pt_gp_valid_id) { if (!tg_pt_gp->tg_pt_gp_valid_id) {
pr_err("Unable to do set ALUA access status on non" pr_err("Unable to set ALUA access status on invalid tg_pt_gp ID\n");
" valid tg_pt_gp ID: %hu\n",
tg_pt_gp->tg_pt_gp_valid_id);
return -EINVAL; return -EINVAL;
} }
...@@ -2852,9 +2849,7 @@ static ssize_t target_tg_pt_gp_alua_support_##_name##_store( \ ...@@ -2852,9 +2849,7 @@ static ssize_t target_tg_pt_gp_alua_support_##_name##_store( \
int ret; \ int ret; \
\ \
if (!t->tg_pt_gp_valid_id) { \ if (!t->tg_pt_gp_valid_id) { \
pr_err("Unable to do set " #_name " ALUA state on non" \ pr_err("Unable to set " #_name " ALUA state on invalid tg_pt_gp ID\n"); \
" valid tg_pt_gp ID: %hu\n", \
t->tg_pt_gp_valid_id); \
return -EINVAL; \ return -EINVAL; \
} \ } \
\ \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment