Thread (1 message) 1 message, 1 author, 2013-09-02

Re: [sfc:master 79/80] drivers/net/ethernet/sfc/mcdi.c:960:1: warning: 'efx_mcdi_print_fwver' uses dynamic stack allocation

From: Ben Hutchings <hidden>
Date: 2013-09-02 18:35:17

On Sat, 2013-08-31 at 07:09 +0800, kbuild test robot wrote:
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next master
head:   f7a6d2c4427790cc8695401576dc594fcce8fc80
commit: 8127d661e77f5ec410093bce411f540afa34593f [79/80] sfc: Add support for Solarflare SFC9100 family
config: make ARCH=s390 allmodconfig

All warnings:

   drivers/net/ethernet/sfc/mcdi.c: In function 'efx_mcdi_print_fwver':
quoted
quoted
drivers/net/ethernet/sfc/mcdi.c:960:1: warning: 'efx_mcdi_print_fwver' uses dynamic stack allocation [enabled by default]
[...]

What we actually do is:

	MCDI_DECLARE_BUF(outbuf,
			 max(MC_CMD_GET_VERSION_OUT_LEN,
			     MC_CMD_GET_CAPABILITIES_OUT_LEN));

The dimension of the outbuf array is constant, even though max() doesn't
expand to a compile-time constant expression.  It's odd that gcc would
complain about this specifically on s390 (or is it that you're using a
different compiler version there?).  I don't know whether anything can
or should be done about to fix the warning.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help