From: Peter Huewe <peterhuewe@gmx.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Devendra Naga <devendra.aaru@gmail.com>,
Peter Huewe <peterhuewe@gmx.de>,
Bill Pemberton <wfp5p@virginia.edu>,
Cruz Julian Bishop <cruzjbishop@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/5] staging/slicoss: Fix operation may be undefined warning
Date: Tue, 19 Feb 2013 05:18:50 +0100 [thread overview]
Message-ID: <1361247532-1874-3-git-send-email-peterhuewe@gmx.de> (raw)
In-Reply-To: <1361247234-1754-1-git-send-email-peterhuewe@gmx.de>
gcc complains about an undefined operation:
slicoss.c:1417:19: warning: operation on 'rspq->pageindex' may be
undefined [-Wsequence-point]
The intended operation was (probably) to retrieve the pageindex + 1 and let
it wrap around if it reaches the num_pages.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
drivers/staging/slicoss/slicoss.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 048a341..fc08585 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -1414,7 +1414,7 @@ static struct slic_rspbuf *slic_rspqueue_getnext(struct adapter *adapter)
slic_reg64_write(adapter, &adapter->slic_regs->slic_rbar64,
(rspq->paddr[rspq->pageindex] | SLIC_RSPQ_BUFSINPAGE),
&adapter->slic_regs->slic_addr_upper, 0, DONT_FLUSH);
- rspq->pageindex = (++rspq->pageindex) % rspq->num_pages;
+ rspq->pageindex = (rspq->pageindex + 1) % rspq->num_pages;
rspq->offset = 0;
rspq->rspbuf = (struct slic_rspbuf *)
rspq->vaddr[rspq->pageindex];
--
1.7.8.6
next prev parent reply other threads:[~2013-02-19 4:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-19 4:13 [PATCH 1/5] staging/slicoss: Check pointer before dereferencing Peter Huewe
2013-02-19 4:18 ` [PATCH 2/5] staging/slicoss: Remove always true if statement Peter Huewe
2013-02-19 4:18 ` Peter Huewe [this message]
2013-02-19 4:18 ` [PATCH 4/5] staging/slicoss: Fix buffer possible overflow in slic_card_locate Peter Huewe
2013-02-19 4:18 ` [PATCH 5/5] staging/slicoss: Use ether_crc for mac hash calculation Peter Huewe
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=1361247532-1874-3-git-send-email-peterhuewe@gmx.de \
--to=peterhuewe@gmx.de \
--cc=cruzjbishop@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=devendra.aaru@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wfp5p@virginia.edu \
/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
all inboxes | Powered by JetHome®