Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2 -2
+2 -2
drivers/atm/he.c
··· 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 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) {