scsi: remove unnecessary NULL test
PATCH 18/19 scsi: remove unnecessary NULL test
From: Jiri Slaby <[email protected]>
From: Jiri Slaby <[email protected]>
Stanse found that c3cn is poked many times around in cxgb3i_conn_pdu_ready, there is no need to check if it is NULL.
Remove the test.
---
drivers/scsi/cxgb3i/cxgb3i_pdu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/cxgb3i/cxgb3i_pdu.c renamed from drivers/scsi/cxgb3i/cxgb3i_pdu.c~scsi-remove-unnecessary-null-test +2 -4
@@ -461,10 +461,8 @@ void cxgb3i_conn_pdu_ready(struct s3_con skb =skb_peek (&c3cn->receive_queue); }read_unlock (&c3cn->callback_lock); -if (c3cn) { - c3cn->copied_seq += read; -cxgb3i_c3cn_rx_credits (c3cn, read); - } + c3cn->copied_seq += read; +cxgb3i_c3cn_rx_credits (c3cn, read); conn->rxdata_octets += read;if (err) {
_
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Monday, December 21, 2009 4:28 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [patch 18/19] scsi: remove unnecessary NULL test
From: Jiri Slaby <[email protected]>
From: Jiri Slaby <[email protected]>
Stanse found that c3cn is poked many times around in cxgb3i_conn_pdu_ready, there is no need to check if it is NULL.
Remove the test.
---
drivers/scsi/cxgb3i/cxgb3i_pdu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff -puN drivers/scsi/cxgb3i/cxgb3i_pdu.c~scsi-remove-unnecessary-null-test drivers/scsi/cxgb3i/cxgb3i_pdu.c
drivers/scsi/cxgb3i/cxgb3i_pdu.c renamed from drivers/scsi/cxgb3i/cxgb3i_pdu.c~scsi-remove-unnecessary-null-test +2 -4
@@ -461,10 +461,8 @@ void cxgb3i_conn_pdu_ready(struct s3_con skb =skb_peek (&c3cn->receive_queue); }read_unlock (&c3cn->callback_lock); -if (c3cn) { - c3cn->copied_seq += read; -cxgb3i_c3cn_rx_credits (c3cn, read); - } + c3cn->copied_seq += read; +cxgb3i_c3cn_rx_credits (c3cn, read); conn->rxdata_octets += read;if (err) {
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html