From patchwork Fri Jun 5 04:51:14 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: 481019 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 246111401DE for ; Fri, 5 Jun 2015 14:42:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5349932E87; Fri, 5 Jun 2015 04:42:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mPw1LSJd2XTj; Fri, 5 Jun 2015 04:42:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id BD31132E98; Fri, 5 Jun 2015 04:42:22 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C13841C1F0F for ; Fri, 5 Jun 2015 04:42:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BD6B391B2B for ; Fri, 5 Jun 2015 04:42:20 +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 k-FpSYIm2EMQ for ; Fri, 5 Jun 2015 04:42:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by whitealder.osuosl.org (Postfix) with ESMTP id 570319173A for ; Fri, 5 Jun 2015 04:42:20 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 04 Jun 2015 21:42:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,555,1427785200"; d="scan'208";a="503074049" Received: from dcs-desk.jf.intel.com ([134.134.176.60]) by FMSMGA003.fm.intel.com with ESMTP; 04 Jun 2015 21:42:20 -0700 From: Don Skidmore To: intel-wired-lan@lists.osuosl.org Date: Fri, 05 Jun 2015 00:51:14 -0400 Message-ID: <20150605045114.26373.80994.stgit@dcs-desk.jf.intel.com> In-Reply-To: <20150605045038.26373.94842.stgit@dcs-desk.jf.intel.com> References: <20150605045038.26373.94842.stgit@dcs-desk.jf.intel.com> User-Agent: StGit/0.17-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [net-next PATCH 2 07/13] 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 | 12 ++++-------- 1 file changed, 4 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..83fc1a3 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -81,6 +81,8 @@ 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 +2409,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 +2456,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)