From patchwork Mon Mar 12 20:12:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Kirsher X-Patchwork-Id: 131395 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp1175411ljb; Mon, 12 Mar 2018 13:12:00 -0700 (PDT) X-Google-Smtp-Source: AG47ELsPC4z2NCe5zssb4ef5Bj2U4JSgbrAQuILf0mvdhZJMbTYtWCrBkAUvLxGyaRBDbVe+NLBb X-Received: by 2002:a17:902:b703:: with SMTP id d3-v6mr1756396pls.209.1520885520802; Mon, 12 Mar 2018 13:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520885520; cv=none; d=google.com; s=arc-20160816; b=WZG+3KJGbfvznlyU/v3SOZfP9m8FJXRrxEqDvIApDv0RlwyW61qnRLG6Hyj4jjytJ8 DjKfMu61ME3CrerebH/ambjlYJeJE4dcGL362Hrp9bTDUzczSXNrqYgJzNPLnaYyN1OX 6OEBym1qOgNTffiae/qdGfeguczSpfEA+0EkuQjT6ecSvI8NDDxzgDpQJQDQOtDD4jhu LtF5GjgT95vmYkoPGJkbbvA7oxGljnFCShyFKiQxGurSiut23/Pwz5kvlvx87OWKGroT hJzh6ZEoGRpDpcolHXsmq4aKRIx2OHL6VM8XQcORdsJ/uZHkt28hTA7Gukqyy9dLp7oQ yfeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=xtGr8CqM6TjYBYwMLJkBpNuPbHLqvjq5TvQ7JYtUpX8=; b=j76h7uHD5g8nPwwu55aWOT4U0VDiHIVPXgHJgTCzADr9Z1yMbgvUfow3judijSchcQ FFBtbaylUdm09zKAFYxDMisxzCJOVRJKV/sXAdZQti09fXWOaQrcrOWfDpIDEHLEVGoY FU27P4xPtxWImOd/Jk4pKXju0Gnewcpko+PpUln7ppesb/XrSjBFfrv5aATZoBg8hrYm k3HJiA2ItREKx6dtH7MfS7EVRwz0IkEENqYuBNY05dzq84KMBf3NTgKBaTGGTjymHIKR KNw7/mwTABk3IUWwZx/xBOB9GxYob0tMUOhsoNREFOvwb8NQ0CyaGwa6ZlPQvTYzvLKS LbUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3-v6si6551235pld.519.2018.03.12.13.12.00; Mon, 12 Mar 2018 13:12:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932322AbeCLUL6 (ORCPT + 8 others); Mon, 12 Mar 2018 16:11:58 -0400 Received: from mga03.intel.com ([134.134.136.65]:26297 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932280AbeCLULz (ORCPT ); Mon, 12 Mar 2018 16:11:55 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2018 13:11:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,463,1515484800"; d="scan'208";a="24019308" Received: from jtkirshe-nuc.jf.intel.com ([134.134.177.59]) by orsmga007.jf.intel.com with ESMTP; 12 Mar 2018 13:11:52 -0700 From: Jeff Kirsher To: davem@davemloft.net Cc: Arnd Bergmann , netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, jogreene@redhat.com, Jeff Kirsher Subject: [net-next 5/6] ixgbevf: fix unused variable warning Date: Mon, 12 Mar 2018 13:12:14 -0700 Message-Id: <20180312201215.2854-6-jeffrey.t.kirsher@intel.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180312201215.2854-1-jeffrey.t.kirsher@intel.com> References: <20180312201215.2854-1-jeffrey.t.kirsher@intel.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann The new ixgbevf_set_rx_buffer_len() function causes a harmless warnings in configurations with large page size: drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function 'ixgbevf_set_rx_buffer_len': drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1758:15: error: unused variable 'max_frame' [-Werror=unused-variable] This rephrases the code so that the compiler can see the use of that variable, making it slightly easier to read in the process. Fixes: f15c5ba5b6cd ("ixgbevf: add support for using order 1 pages to receive large frames") Signed-off-by: Arnd Bergmann Tested-by: Andrew Bowers Acked-by: Alexander Duyck Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.14.3 diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index f37307131eb6..4da449e0a4ba 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -1766,12 +1766,12 @@ static void ixgbevf_set_rx_buffer_len(struct ixgbevf_adapter *adapter, set_ring_build_skb_enabled(rx_ring); -#if (PAGE_SIZE < 8192) - if (max_frame <= IXGBEVF_MAX_FRAME_BUILD_SKB) - return; + if (PAGE_SIZE < 8192) { + if (max_frame <= IXGBEVF_MAX_FRAME_BUILD_SKB) + return; - set_ring_uses_large_buffer(rx_ring); -#endif + set_ring_uses_large_buffer(rx_ring); + } } /**