scsi: iscsi_tcp: Remove a set-but-not-used variable
authorBart Van Assche <bart.vanassche@wdc.com>
Fri, 25 Aug 2017 20:46:43 +0000 (13:46 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 21:08:08 +0000 (17:08 -0400)
This patch avoids that gcc reports the following warning when
building with W=1:

drivers/scsi/iscsi_tcp.c:166:24: warning: variable ?session? set but not used [-Wunused-but-set-variable]

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cc: Lee Duncan <lduncan@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/iscsi_tcp.c

index 4842fc0e809d1cf6846ba531165953f1dd11f993..4d934d6c3e13adb26a91fec4dc665ed1f3f45bcb 100644 (file)
@@ -163,7 +163,6 @@ static void iscsi_sw_tcp_state_change(struct sock *sk)
        struct iscsi_tcp_conn *tcp_conn;
        struct iscsi_sw_tcp_conn *tcp_sw_conn;
        struct iscsi_conn *conn;
-       struct iscsi_session *session;
        void (*old_state_change)(struct sock *);
 
        read_lock_bh(&sk->sk_callback_lock);
@@ -172,7 +171,6 @@ static void iscsi_sw_tcp_state_change(struct sock *sk)
                read_unlock_bh(&sk->sk_callback_lock);
                return;
        }
-       session = conn->session;
 
        iscsi_sw_sk_state_check(sk);