linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Keller, Jacob E" <jacob.e.keller@intel.com>
To: Arnd Bergmann <arnd@arndb.de>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>
Cc: "Pujari, Bimmy" <bimmy.pujari@intel.com>,
	"Duyck, Alexander H" <alexander.h.duyck@intel.com>,
	"Williams, Mitch A" <mitch.a.williams@intel.com>,
	"Brady, Alan" <alan.brady@intel.com>,
	"Joe Perches" <joe@perches.com>,
	"Singhai, Anjali" <anjali.singhai@intel.com>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
	"Banala, Preethi" <preethi.banala@intel.com>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH net-next] i40evf: hide unused variable
Date: Wed, 19 Apr 2017 20:47:58 +0000	[thread overview]
Message-ID: <02874ECE860811409154E81DA85FBB5857E088EB@ORSMSX115.amr.corp.intel.com> (raw)
In-Reply-To: <20170419173008.3648215-1-arnd@arndb.de>

> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@arndb.de]
> Sent: Wednesday, April 19, 2017 10:30 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
> Cc: Arnd Bergmann <arnd@arndb.de>; Pujari, Bimmy
> <bimmy.pujari@intel.com>; Duyck, Alexander H
> <alexander.h.duyck@intel.com>; Williams, Mitch A
> <mitch.a.williams@intel.com>; Keller, Jacob E <jacob.e.keller@intel.com>; Brady,
> Alan <alan.brady@intel.com>; Joe Perches <joe@perches.com>; Singhai, Anjali
> <anjali.singhai@intel.com>; Brandeburg, Jesse <jesse.brandeburg@intel.com>;
> Banala, Preethi <preethi.banala@intel.com>; intel-wired-lan@lists.osuosl.org;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH net-next] i40evf: hide unused variable
> 
> On architectures with larger pages, we get a warning about an unused variable:
> 
> drivers/net/ethernet/intel/i40evf/i40evf_main.c: In function
> 'i40evf_configure_rx':
> drivers/net/ethernet/intel/i40evf/i40evf_main.c:690:21: error: unused variable
> 'netdev' [-Werror=unused-variable]
> 
> This moves the declaration into the #ifdef to avoid the warning.
> 

Makes sense.

Acked-by: Jacob Keller <jacob.e.keller@intel.com>

> Fixes: dab86afdbbd1 ("i40e/i40evf: Change the way we limit the maximum frame
> size for Rx")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> index 12a930e879af..1bb13c864edd 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> @@ -687,13 +687,14 @@ static void i40evf_configure_tx(struct i40evf_adapter
> *adapter)
>  static void i40evf_configure_rx(struct i40evf_adapter *adapter)
>  {
>  	unsigned int rx_buf_len = I40E_RXBUFFER_2048;
> -	struct net_device *netdev = adapter->netdev;
>  	struct i40e_hw *hw = &adapter->hw;
>  	int i;
> 
>  	/* Legacy Rx will always default to a 2048 buffer size. */
>  #if (PAGE_SIZE < 8192)
>  	if (!(adapter->flags & I40EVF_FLAG_LEGACY_RX)) {
> +		struct net_device *netdev = adapter->netdev;
> +
>  		/* For jumbo frames on systems with 4K pages we have to use
>  		 * an order 1 page, so we might as well increase the size
>  		 * of our Rx buffer to make better use of the available space
> --
> 2.9.0

      reply	other threads:[~2017-04-19 20:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 17:29 Arnd Bergmann
2017-04-19 20:47 ` Keller, Jacob E [this message]

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=02874ECE860811409154E81DA85FBB5857E088EB@ORSMSX115.amr.corp.intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=alan.brady@intel.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=anjali.singhai@intel.com \
    --cc=arnd@arndb.de \
    --cc=bimmy.pujari@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitch.a.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=preethi.banala@intel.com \
    --subject='RE: [PATCH net-next] i40evf: hide unused variable' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).