Netdev List
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: <kbuild-all@01.org>, netdev <netdev@vger.kernel.org>,
	linux-net-drivers <linux-net-drivers@solarflare.com>
Subject: Re: [sfc:master 79/80] drivers/net/ethernet/sfc/mcdi.c:960:1: warning: 'efx_mcdi_print_fwver' uses dynamic stack allocation
Date: Mon, 2 Sep 2013 19:35:12 +0100	[thread overview]
Message-ID: <1378146912.1552.29.camel@bwh-desktop.uk.level5networks.com> (raw)
In-Reply-To: <5221261c.gkIQ84VFSaPYEYzp%fengguang.wu@intel.com>

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':
> >> 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.

           reply	other threads:[~2013-09-02 18:35 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <5221261c.gkIQ84VFSaPYEYzp%fengguang.wu@intel.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1378146912.1552.29.camel@bwh-desktop.uk.level5networks.com \
    --to=bhutchings@solarflare.com \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-net-drivers@solarflare.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox