linux-stable/drivers/infiniband
Roland Dreier f27ec1d6db IB/qib: Don't rely on (undefined) order of function parameter evaluation
Some of the qib sysfs code passes a buffer pointer into 
simple_read_from_buffer() but relies on a function call in another 
parameter of the same call to initialize that pointer.  Since the order
of evaluation of function parameters is undefined, this will break if
gcc chooses the wrong order.

Fix this by splitting the code into two separate function calls.

This was noticed because of warnings like the following on ppc:

    drivers/infiniband/hw/qib/qib_fs.c: In function 'portcntrs_2_read':
    drivers/infiniband/hw/qib/qib_fs.c:203: warning: 'counters' is used uninitialized in this function

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2010-05-26 13:15:06 -07:00
..
core Merge branches 'cxgb4', 'misc', 'mlx4', 'nes' and 'qib' into for-next 2010-05-25 09:54:03 -07:00
hw IB/qib: Don't rely on (undefined) order of function parameter evaluation 2010-05-26 13:15:06 -07:00
ulp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-05-20 21:04:44 -07:00
Kconfig IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters 2010-05-23 21:44:54 -07:00
Makefile IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters 2010-05-23 21:44:54 -07:00