From: Roland Dreier Date: Wed, 26 May 2010 20:15:06 +0000 (-0700) Subject: IB/qib: Don't rely on (undefined) order of function parameter evaluation X-Git-Tag: v2.6.35-rc1~9^2^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f27ec1d6db4aa3348ca7be896f1466599aecea3e;p=pandora-kernel.git 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 Signed-off-by: Roland Dreier --- Reading git-diff-tree failed