Skip to content

Commit

Permalink
atm: he: Fix undefined sequence points.
Browse files Browse the repository at this point in the history
GCC complains in these queue index operations because we
perform operations of the form:

	x = some_operation(++x);

which is undefined.  Replace with:

	x = some_operation(x + 1);

which is well defined and provides the intended operation.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Apr 17, 2011
1 parent dd18257 commit e60c5e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/atm/he.c
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
next_rbrq_entry:
he_dev->rbrq_head = (struct he_rbrq *)
((unsigned long) he_dev->rbrq_base |
RBRQ_MASK(++he_dev->rbrq_head));
RBRQ_MASK(he_dev->rbrq_head + 1));

}
read_unlock(&vcc_sklist_lock);
Expand Down Expand Up @@ -1884,7 +1884,7 @@ he_service_tbrq(struct he_dev *he_dev, int group)
pci_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status));
he_dev->tbrq_head = (struct he_tbrq *)
((unsigned long) he_dev->tbrq_base |
TBRQ_MASK(++he_dev->tbrq_head));
TBRQ_MASK(he_dev->tbrq_head + 1));
}

if (updated) {
Expand Down

0 comments on commit e60c5e1

Please sign in to comment.