From patchwork Thu Jun 4 00:13:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Skidmore, Donald C" X-Patchwork-Id: 480325 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 1BA7D1401EF for ; Thu, 4 Jun 2015 10:05:03 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5C0558D3EA; Thu, 4 Jun 2015 00:05:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D9+OvpGbFN9q; Thu, 4 Jun 2015 00:05:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id E28418D2B3; Thu, 4 Jun 2015 00:05:01 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id A5EE71BFA20 for ; Thu, 4 Jun 2015 00:05:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A0233956B6 for ; Thu, 4 Jun 2015 00:05:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I6p-8-mmdPhm for ; Thu, 4 Jun 2015 00:05:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by hemlock.osuosl.org (Postfix) with ESMTP id 13DDA956B0 for ; Thu, 4 Jun 2015 00:05:00 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 03 Jun 2015 17:04:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,549,1427785200"; d="scan'208";a="740545755" Received: from dcs-desk.jf.intel.com ([134.134.176.60]) by orsmga002.jf.intel.com with ESMTP; 03 Jun 2015 17:05:00 -0700 From: Don Skidmore To: intel-wired-lan@lists.osuosl.org Date: Wed, 03 Jun 2015 20:13:53 -0400 Message-ID: <20150604001353.18893.83669.stgit@dcs-desk.jf.intel.com> In-Reply-To: <20150604001322.18893.48953.stgit@dcs-desk.jf.intel.com> References: <20150604001322.18893.48953.stgit@dcs-desk.jf.intel.com> User-Agent: StGit/0.17-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [net-next PATCH 07/11] ixgbe: Add const string for overheat message X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@lists.osuosl.org Sender: "Intel-wired-lan" The over heat message is displayed for mutliple reasons but the text is cut-n-pasted for each of these cases. This patch pulls the text from the same location. I noticed this as I am about to add anothere case. Signed-off-by: Don Skidmore --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 5aea3ef..8f8c5d3 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -81,6 +81,11 @@ const char ixgbe_driver_version[] = DRV_VERSION; static const char ixgbe_copyright[] = "Copyright (c) 1999-2014 Intel Corporation."; +static const char ixgbe_overheat_msg[] = + "Network adapter has been stopped because it has over heated. " + "Restart the computer. If the problem persists, " + "power off the system and replace the adapter"; + static const struct ixgbe_info *ixgbe_info_tbl[] = { [board_82598] = &ixgbe_82598_info, [board_82599] = &ixgbe_82599_info, @@ -2407,10 +2412,7 @@ static void ixgbe_check_overtemp_subtask(struct ixgbe_adapter *adapter) return; break; } - e_crit(drv, - "Network adapter has been stopped because it has over heated. " - "Restart the computer. If the problem persists, " - "power off the system and replace the adapter\n"); + e_crit(drv, "%s\n", ixgbe_overheat_msg); adapter->interrupt_event = 0; } @@ -2457,10 +2459,7 @@ static void ixgbe_check_overtemp_event(struct ixgbe_adapter *adapter, u32 eicr) return; } - e_crit(drv, - "Network adapter has been stopped because it has over heated. " - "Restart the computer. If the problem persists, " - "power off the system and replace the adapter\n"); + e_crit(drv, "%s\n", ixgbe_overheat_msg); } static void ixgbe_check_sfp_event(struct ixgbe_adapter *adapter, u32 eicr)