Commit e60c5e14fbfcaa54f430aad80b38763a403b2158
1 parent
dd182574d8
Exists in
master
and in
7 other branches
atm: he: Fix undefined sequence points.
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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/atm/he.c
... | ... | @@ -1801,7 +1801,7 @@ |
1801 | 1801 | next_rbrq_entry: |
1802 | 1802 | he_dev->rbrq_head = (struct he_rbrq *) |
1803 | 1803 | ((unsigned long) he_dev->rbrq_base | |
1804 | - RBRQ_MASK(++he_dev->rbrq_head)); | |
1804 | + RBRQ_MASK(he_dev->rbrq_head + 1)); | |
1805 | 1805 | |
1806 | 1806 | } |
1807 | 1807 | read_unlock(&vcc_sklist_lock); |
... | ... | @@ -1884,7 +1884,7 @@ |
1884 | 1884 | pci_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status)); |
1885 | 1885 | he_dev->tbrq_head = (struct he_tbrq *) |
1886 | 1886 | ((unsigned long) he_dev->tbrq_base | |
1887 | - TBRQ_MASK(++he_dev->tbrq_head)); | |
1887 | + TBRQ_MASK(he_dev->tbrq_head + 1)); | |
1888 | 1888 | } |
1889 | 1889 | |
1890 | 1890 | if (updated) { |