[stgt] [PATCH 6/8] Fix "set but not used" warning in iser.c: comment out irdsl related lines; irdsl value is not used meanwhile, as we use a shortcut to cover up an initiator glitch
nezhinsky at gmail.com
nezhinsky at gmail.com
Wed Apr 25 16:52:19 CEST 2012
- Previous message: [stgt] [PATCH 5/8] Improve str_to_int() There is a potential problem when a user-supplied value overflows the accepting variable; to cope with this the string is converted to a 64-bit value first then assigned to the variable, then the macro checks if they represent the same value. Thus the natural type boundaries are automatically guarded. This means that there is no need to use type's range limits (e.g. 0 and USHRT_MAX for unsigned short). Thus the range limit parameters are removed from str_to_int() -- it's enough for the (most frequent) cases when any value fitting a certain integer type is admissible. When the min/max values are relevant they can be passed to one of the new macros str_to_int_gt, str_to_int_ge, str_to_int_lt, str_to_int_range, requiring that the int value should be greater than, greater or equal, less than, or within a range, correspondingly.
- Next message: [stgt] [PATCH 7/8] If adding Unit Attention sense fails upon target destroy, just print error message and still return TGTADM_SUCCESS
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
From: Alexander Nezhinsky <alexandern at mellanox.com>
Signed-off-by: Alexander Nezhinsky <alexandern at mellanox.com>
---
usr/iscsi/iser.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/usr/iscsi/iser.c b/usr/iscsi/iser.c
index 33112cd..b60ce74 100644
--- a/usr/iscsi/iser.c
+++ b/usr/iscsi/iser.c
@@ -1044,14 +1044,16 @@ static void iser_free_ff_resources(struct iser_conn *conn)
int iser_login_complete(struct iscsi_connection *iscsi_conn)
{
struct iser_conn *conn = ISER_CONN(iscsi_conn);
- unsigned int irdsl, trdsl, outst_pdu, hdrsz;
+ unsigned int trdsl;
+ /* unsigned int irdsl; */
+ unsigned int outst_pdu, hdrsz;
int err = -1;
dprintf("entry\n");
/* one more send, then done; login resources are left until then */
iser_conn_login_phase_set(conn, LOGIN_PHASE_LAST_SEND);
- irdsl = iscsi_conn->session_param[ISCSI_PARAM_INITIATOR_RDSL].val;
+ /* irdsl = iscsi_conn->session_param[ISCSI_PARAM_INITIATOR_RDSL].val; */
trdsl = iscsi_conn->session_param[ISCSI_PARAM_TARGET_RDSL].val;
/* ToDo: outstanding pdus num */
--
1.7.9.6
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
- Previous message: [stgt] [PATCH 5/8] Improve str_to_int() There is a potential problem when a user-supplied value overflows the accepting variable; to cope with this the string is converted to a 64-bit value first then assigned to the variable, then the macro checks if they represent the same value. Thus the natural type boundaries are automatically guarded. This means that there is no need to use type's range limits (e.g. 0 and USHRT_MAX for unsigned short). Thus the range limit parameters are removed from str_to_int() -- it's enough for the (most frequent) cases when any value fitting a certain integer type is admissible. When the min/max values are relevant they can be passed to one of the new macros str_to_int_gt, str_to_int_ge, str_to_int_lt, str_to_int_range, requiring that the int value should be greater than, greater or equal, less than, or within a range, correspondingly.
- Next message: [stgt] [PATCH 7/8] If adding Unit Attention sense fails upon target destroy, just print error message and still return TGTADM_SUCCESS
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the stgt
mailing list