From patchwork Thu Mar 28 18:06:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10875673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D878186E for ; Thu, 28 Mar 2019 18:06:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46AE428DA5 for ; Thu, 28 Mar 2019 18:06:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3892B28DE7; Thu, 28 Mar 2019 18:06:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BAF928DF0 for ; Thu, 28 Mar 2019 18:06:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726692AbfC1SGf (ORCPT ); Thu, 28 Mar 2019 14:06:35 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37619 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbfC1SGe (ORCPT ); Thu, 28 Mar 2019 14:06:34 -0400 Received: by mail-pl1-f196.google.com with SMTP id q6so5316285pll.4 for ; Thu, 28 Mar 2019 11:06:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/vKl6KOCZjeiTLKPg1L6DV3rEMDO7jZohZeiEm8Xoww=; b=eMJLZZaH828zBXv2yvtja1grqeLKuRrofFO3lDqyqo1mkga4q72riDUWR5nfjxfVXf yQ9PE6OaV41YHIvAQjaaWcGBTof5MH2BGxdJNygNCTXV8R+mwjXhn4mknbHqTGcxR2Vf mXDb4panYUPLmZex7KEmhV95OVpANkTpL/cdczz/G5q4lO38RCFYOS6BbfnF9DdslHR4 XM5wl7qWGZKSez3DYIA5/M5gMSb5O3Tdei96afM2rLOQq1BKE4s1Ng4kzZExl4GAqJRK 9HH08g99r28ZDKVLpl5DCDRPq/xfQ7B7nA3eGxAGgltlULUJvFeLA1tgXx31Jn416len MmBA== X-Gm-Message-State: APjAAAUXWopPu5WaP9EupHrPBs7izLrruFIAp2I144sxVK3UnJprpW9W tnytAcy5O/3UiO1c/d6Bstc= X-Google-Smtp-Source: APXvYqzDygLeMqQkig5kxFD4C7ARAn+bzeA9YO8pCOpHcxAbDEG6Iz6cyv9B7YUbcVNQpkUzIKre7A== X-Received: by 2002:a17:902:2848:: with SMTP id e66mr45152858plb.181.1553796394187; Thu, 28 Mar 2019 11:06:34 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id k72sm72025267pfb.122.2019.03.28.11.06.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 11:06:33 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , James Smart Subject: [PATCH 4/7] lpfc: Move trunk_errmsg[] from a header file into a .c file Date: Thu, 28 Mar 2019 11:06:19 -0700 Message-Id: <20190328180622.34984-5-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190328180622.34984-1-bvanassche@acm.org> References: <20190328180622.34984-1-bvanassche@acm.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Arrays should be defined in .c files instead of in a header file. This patch reduces the size of the lpfc kernel module. Cc: James Smart Signed-off-by: Bart Van Assche --- drivers/scsi/lpfc/lpfc_attr.c | 17 +++++++++++++++++ drivers/scsi/lpfc/lpfc_hw4.h | 17 +---------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 7259cd0532bc..e9adb3f1961d 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -71,6 +71,23 @@ #define LPFC_REG_WRITE_KEY_SIZE 4 #define LPFC_REG_WRITE_KEY "EMLX" +const char *const trunk_errmsg[] = { /* map errcode */ + "", /* There is no such error code at index 0*/ + "link negotiated speed does not match existing" + " trunk - link was \"low\" speed", + "link negotiated speed does not match" + " existing trunk - link was \"middle\" speed", + "link negotiated speed does not match existing" + " trunk - link was \"high\" speed", + "Attached to non-trunking port - F_Port", + "Attached to non-trunking port - N_Port", + "FLOGI response timeout", + "non-FLOGI frame received", + "Invalid FLOGI response", + "Trunking initialization protocol", + "Trunk peer device mismatch", +}; + /** * lpfc_jedec_to_ascii - Hex to ascii convertor according to JEDEC rules * @incr: integer to convert. diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 3b5988669b54..77f9a55a3f54 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -4084,22 +4084,7 @@ struct lpfc_acqe_grp5 { uint32_t trailer; }; -static char *const trunk_errmsg[] = { /* map errcode */ - "", /* There is no such error code at index 0*/ - "link negotiated speed does not match existing" - " trunk - link was \"low\" speed", - "link negotiated speed does not match" - " existing trunk - link was \"middle\" speed", - "link negotiated speed does not match existing" - " trunk - link was \"high\" speed", - "Attached to non-trunking port - F_Port", - "Attached to non-trunking port - N_Port", - "FLOGI response timeout", - "non-FLOGI frame received", - "Invalid FLOGI response", - "Trunking initialization protocol", - "Trunk peer device mismatch", -}; +extern const char *const trunk_errmsg[]; struct lpfc_acqe_fc_la { uint32_t word0;