From: Harish Patil <harish.patil@qlogic.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <Dept-GELinuxNICDev@qlogic.com>,
<sudarsana.kalluru@qlogic.com>,
Harish Patil <harish.patil@qlogic.com>
Subject: [PATCH net-next 1/2] qlge: Fix compilation warning
Date: Thu, 18 Sep 2014 17:27:24 -0400 [thread overview]
Message-ID: <1411075645-21845-2-git-send-email-harish.patil@qlogic.com> (raw)
In-Reply-To: <1411075645-21845-1-git-send-email-harish.patil@qlogic.com>
From: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Fix the below warning message:
qlge_main.c:1754: warning: 'lbq_desc' may be used uninitialized in this function
---
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 3e96f26..6c904a6 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -1922,7 +1922,7 @@ static struct sk_buff *ql_build_rx_skb(struct ql_adapter *qdev,
sbq_desc->p.skb = NULL;
skb_reserve(skb, NET_IP_ALIGN);
}
- while (length > 0) {
+ do {
lbq_desc = ql_get_curr_lchunk(qdev, rx_ring);
size = (length < rx_ring->lbq_buf_size) ? length :
rx_ring->lbq_buf_size;
@@ -1939,7 +1939,7 @@ static struct sk_buff *ql_build_rx_skb(struct ql_adapter *qdev,
skb->truesize += size;
length -= size;
i++;
- }
+ } while (length > 0);
ql_update_mac_hdr_len(qdev, ib_mac_rsp, lbq_desc->p.pg_chunk.va,
&hlen);
__pskb_pull_tail(skb, hlen);
--
1.8.1.4
next prev parent reply other threads:[~2014-09-18 22:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 21:27 [PATCH net-next 0/2] qlge: Fix compilation warning and update maintainers Harish Patil
2014-09-18 21:27 ` Harish Patil [this message]
2014-09-22 18:36 ` [PATCH net-next 1/2] qlge: Fix compilation warning David Miller
2014-09-18 21:27 ` [PATCH net-next 2/2] Update qlge driver maintainers list Harish Patil
2014-09-22 18:36 ` [PATCH net-next 0/2] qlge: Fix compilation warning and update maintainers David Miller
-- strict thread matches above, loose matches on Subject: below --
2014-08-13 18:08 Harish Patil
2014-08-13 18:08 ` [PATCH net-next 1/2] qlge: Fix compilation warning Harish Patil
2014-08-14 21:31 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411075645-21845-2-git-send-email-harish.patil@qlogic.com \
--to=harish.patil@qlogic.com \
--cc=Dept-GELinuxNICDev@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sudarsana.kalluru@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).