From patchwork Thu Apr 11 21:53:20 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: 10896955 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 548241669 for ; Thu, 11 Apr 2019 21:53:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4061C28E21 for ; Thu, 11 Apr 2019 21:53:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3ECA928E24; Thu, 11 Apr 2019 21:53:47 +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 E20B328E34 for ; Thu, 11 Apr 2019 21:53:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbfDKVxq (ORCPT ); Thu, 11 Apr 2019 17:53:46 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43712 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726818AbfDKVxo (ORCPT ); Thu, 11 Apr 2019 17:53:44 -0400 Received: by mail-pg1-f196.google.com with SMTP id z9so4121045pgu.10 for ; Thu, 11 Apr 2019 14:53:44 -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=Z+hw/e/gvH1KsX9K30qqcWtxlQvbYmMJOResQ6lfLy8=; b=CrsvpoZyAjlI2AB+/WFzNGS8W0cERAT9fIkVzceFbEAQidf0oelFjxgGBQnKawh6Fn m0wT0bNd6rwzdedZipJKQj7XXGK7LhhKqlvDNcHzp1bQLIN1KszO8utVdSj4R2Y6spUZ sifA/Onx0I62TAFf6ZuDNfz2/KZrHcEgVmT/M0ZJXGS4qEn9L7/47auj0gpjBSRi2ssv kKNOJnY5o37X6E8tkwedWwRaIoDdWtf8noyT+5pVQNYvmdhTbH0Pdi+f+UWB3Sf/VTgq ZlT8aLkFCDNjr+xigEcaUJqurr/4JhZ7HoZ94NY+k7OZxj0P9vFpx3Oq+z+kbOsviskZ oUpQ== X-Gm-Message-State: APjAAAXl7kuNByMVmbqd3ucKmR25BJDj9RAdjRS2pAmdluxd1ccP7Ks8 BS7K69Ih31ps+1SHbG5bW3o= X-Google-Smtp-Source: APXvYqwMTz+AIZJrB9v5qBqs6UQQ6CU83JQaPDxcxjhCvdMJVPgDelMD9wnfydiFsRMncmFB/wf07g== X-Received: by 2002:a62:14d7:: with SMTP id 206mr51396156pfu.162.1555019623738; Thu, 11 Apr 2019 14:53:43 -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 o67sm91651066pga.55.2019.04.11.14.53.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 14:53:42 -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 , Himanshu Madhani , Giridhar Malavali Subject: [PATCH 05/10] qla2xxx: Move the port_state_str[] definition from a .h to a .c file Date: Thu, 11 Apr 2019 14:53:20 -0700 Message-Id: <20190411215325.122837-6-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190411215325.122837-1-bvanassche@acm.org> References: <20190411215325.122837-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 Reduce the size of the qla2xxx kernel module by moving an array definition from a .h into a .c file. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_def.h | 8 +------- drivers/scsi/qla2xxx/qla_isr.c | 8 ++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 67ed4b236f32..aa1477c21e92 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -2469,13 +2469,7 @@ struct event_arg { #define FCS_DEVICE_LOST 3 #define FCS_ONLINE 4 -static const char * const port_state_str[] = { - "Unknown", - "UNCONFIGURED", - "DEAD", - "LOST", - "ONLINE" -}; +extern const char *const port_state_str[5]; /* * FC port flags. diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 9d3211e7de88..8432ef05f20b 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -23,6 +23,14 @@ static void qla2x00_status_cont_entry(struct rsp_que *, sts_cont_entry_t *); static int qla2x00_error_entry(scsi_qla_host_t *, struct rsp_que *, sts_entry_t *); +const char *const port_state_str[] = { + "Unknown", + "UNCONFIGURED", + "DEAD", + "LOST", + "ONLINE" +}; + /** * qla2100_intr_handler() - Process interrupts for the ISP2100 and ISP2200. * @irq: interrupt number