From patchwork Tue Aug 2 15:22:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101976 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp224623qga; Tue, 2 Aug 2016 08:24:49 -0700 (PDT) X-Received: by 10.66.193.163 with SMTP id hp3mr108047096pac.73.1470151487133; Tue, 02 Aug 2016 08:24:47 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kc15si3492320pad.246.2016.08.02.08.24.46; Tue, 02 Aug 2016 08:24:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967086AbcHBPYY (ORCPT + 27 others); Tue, 2 Aug 2016 11:24:24 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:62326 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964935AbcHBPXP (ORCPT ); Tue, 2 Aug 2016 11:23:15 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MYcc6-1biMtj1X3y-00VQ9m; Tue, 02 Aug 2016 17:23:01 +0200 From: Arnd Bergmann To: Anil Gurumurthy , Sudarsana Kalluru Cc: "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Baoyou Xie , Arnd Bergmann Subject: [PATCH 3/5] bfa: rename some global variables Date: Tue, 2 Aug 2016 17:22:48 +0200 Message-Id: <20160802152250.1964074-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160802152250.1964074-1-arnd@arndb.de> References: <20160802152250.1964074-1-arnd@arndb.de> X-Provags-ID: V03:K0:NjeDaZfeS7SLVxE4Rg8eJGbm5JsQqEVEYdyv9PsIFnb+b9MlLK5 yCyNJayJRXeg5pD3elp7KmNcwI8fOFLSvVUBrxpG0sV3sr9SI6+LVyqeWky58nb4qdSxO+h mcV/OdcMRjNads5sCAY2NT1JsBaBWL63/aB9dSKtra7k+A4M48T+vQM7No0PIzvrNketaRP /A/MHy/QMEMkAxj1EtacQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:wixkjMOqE4U=:msFSYC3z5179UReLkaP3M0 JD6ol6gvLX/jDypfOxDw4dC6dTI0/65TCZsOdHzb0FwsQCC0ipMFNvuA8/xOVTgu9MJ0fh6zK 2S/9dhe2+tcxbKki1l6p2FNv8xA3UJDzVmAzSvN5COouUrVvDqu0AzJY36sH/MKqOq8xE/N7N BcRE18kZ9G4wJtswbfCXddLgR+Zrv94exa0OveTx1ksso9M3jvxi7WrbdwNtLwEFymiW4paRr WLbuEv2TVix4apXgctJcGTLp+UZ+Mvq2nqsj2hs3oNUH6mKF+Fx2c4BUMn0IahdtZkdDHplIT MitL+TlYWCumQsGZPJ6NOPhXPHdOQ1Aud4XtBVgPmlmgkIdK/M+I6xUocFFJCC+EFGLkCLDDX uCdraOjDDFDrvO8qCjIMZ/7UEqR6X6pY1BYK7sKzqniLi6RhuDOTOoVdxzDIFEt+hSQx21lST dB7P22969cT+LzS0v5HUyBBQ29KjVYf132eEYN3apWyf4BYr9h3ZBKq82E+Y1N6ltjg82mtqP qEJV1Sc4b6l+ifdFBQYBhXCXbLDsbiQ2Rurh9jRAEJhluku3fQKj5ZimooSigQqM6yIR3hHB7 +vjD1GlIbxJw2AFHtVu2+JUTdBDw99wh5BJjrAWzZSV48R+SIfTq18Axl5zxtpx+Fm4zgeYNr hhvSZMb4k1hBaqJiUVo+IyFZx79RDz/SOuW53EPjSITZ4VjQyqFWmZfO6tawIiUBl24Y= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The global "supported_fc4s" and "max_xfer_size" variables have rather generic names that might conflict with the same identifiers used in other drivers, and we cannot make them 'static' because they are both used across multiple files. This adds a 'bfa_' prefix to ensure the identifiers are globally unique. Signed-off-by: Arnd Bergmann --- drivers/scsi/bfa/bfad.c | 20 ++++++++++---------- drivers/scsi/bfa/bfad_attr.c | 2 +- drivers/scsi/bfa/bfad_drv.h | 4 ++-- drivers/scsi/bfa/bfad_im.c | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) -- 2.9.0 diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 9b010b999825..3cb11f6c0b28 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c @@ -42,7 +42,7 @@ static LIST_HEAD(bfad_list); int bfad_inst; static int num_sgpgs_parm; -int supported_fc4s; +int bfa_supported_fc4s; static char *host_name, *os_name, *os_patch; static int num_rports, num_ios, num_tms; static int num_fcxps, num_ufbufs; @@ -57,7 +57,7 @@ static int fdmi_enable = BFA_TRUE; static int pcie_max_read_reqsz; int bfa_debugfs_enable = 1; static int msix_disable_cb = 0, msix_disable_ct = 0; -int max_xfer_size = BFAD_MAX_SECTORS >> 1; +int bfa_max_xfer_size = BFAD_MAX_SECTORS >> 1; static int max_rport_logins = BFA_FCS_MAX_RPORT_LOGINS; /* Firmware releated */ @@ -143,7 +143,7 @@ MODULE_PARM_DESC(pcie_max_read_reqsz, "PCIe max read request size, default=0 " module_param(bfa_debugfs_enable, int, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(bfa_debugfs_enable, "Enables debugfs feature, default=1," " Range[false:0|true:1]"); -module_param(max_xfer_size, int, S_IRUGO | S_IWUSR); +module_param_named(max_xfer_size, bfa_max_xfer_size, int, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(max_xfer_size, "default=32MB," " Range[64k|128k|256k|512k|1024k|2048k]"); module_param(max_rport_logins, int, S_IRUGO | S_IWUSR); @@ -945,7 +945,7 @@ bfad_cfg_pport(struct bfad_s *bfad, enum bfa_lport_role role) int rc = BFA_STATUS_OK; /* Allocate scsi_host for the physical port */ - if ((supported_fc4s & BFA_LPORT_ROLE_FCP_IM) && + if ((bfa_supported_fc4s & BFA_LPORT_ROLE_FCP_IM) && (role & BFA_LPORT_ROLE_FCP_IM)) { if (bfad->pport.im_port == NULL) { rc = BFA_STATUS_FAILED; @@ -969,7 +969,7 @@ out: static void bfad_uncfg_pport(struct bfad_s *bfad) { - if ((supported_fc4s & BFA_LPORT_ROLE_FCP_IM) && + if ((bfa_supported_fc4s & BFA_LPORT_ROLE_FCP_IM) && (bfad->pport.roles & BFA_LPORT_ROLE_FCP_IM)) { bfad_im_scsi_host_free(bfad, bfad->pport.im_port); bfad_im_port_clean(bfad->pport.im_port); @@ -990,10 +990,10 @@ bfad_start_ops(struct bfad_s *bfad) struct bfa_fcs_driver_info_s driver_info; /* Limit min/max. xfer size to [64k-32MB] */ - if (max_xfer_size < BFAD_MIN_SECTORS >> 1) - max_xfer_size = BFAD_MIN_SECTORS >> 1; - if (max_xfer_size > BFAD_MAX_SECTORS >> 1) - max_xfer_size = BFAD_MAX_SECTORS >> 1; + if (bfa_max_xfer_size < BFAD_MIN_SECTORS >> 1) + bfa_max_xfer_size = BFAD_MIN_SECTORS >> 1; + if (bfa_max_xfer_size > BFAD_MAX_SECTORS >> 1) + bfa_max_xfer_size = BFAD_MAX_SECTORS >> 1; /* Fill the driver_info info to fcs*/ memset(&driver_info, 0, sizeof(driver_info)); @@ -1734,7 +1734,7 @@ bfad_init(void) } if (strcmp(FCPI_NAME, " fcpim") == 0) - supported_fc4s |= BFA_LPORT_ROLE_FCP_IM; + bfa_supported_fc4s |= BFA_LPORT_ROLE_FCP_IM; bfa_auto_recover = ioc_auto_recover; bfa_fcs_rport_set_del_timeout(rport_del_timeout); diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c index d6a5edabf1ff..f49c6a7e6323 100644 --- a/drivers/scsi/bfa/bfad_attr.c +++ b/drivers/scsi/bfa/bfad_attr.c @@ -416,7 +416,7 @@ bfad_im_vport_create(struct fc_vport *fc_vport, bool disable) sizeof(fc_host_supported_fc4s(vshost))); /* For FCP type 0x08 */ - if (supported_fc4s & BFA_LPORT_ROLE_FCP_IM) + if (bfa_supported_fc4s & BFA_LPORT_ROLE_FCP_IM) fc_host_supported_fc4s(vshost)[2] = 1; /* For fibre channel services type 0x20 */ diff --git a/drivers/scsi/bfa/bfad_drv.h b/drivers/scsi/bfa/bfad_drv.h index b70870411af6..6c5b81708a08 100644 --- a/drivers/scsi/bfa/bfad_drv.h +++ b/drivers/scsi/bfa/bfad_drv.h @@ -311,8 +311,8 @@ int bfad_get_linkup_delay(struct bfad_s *bfad); extern int bfa_lun_queue_depth; extern int bfa_log_level; extern int bfa_linkup_delay; -extern int supported_fc4s; -extern int max_xfer_size; +extern int bfa_supported_fc4s; +extern int bfa_max_xfer_size; extern int bfa_debugfs_enable; extern struct mutex bfad_mutex; diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index f56a22a640ea..50270e6188e9 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c @@ -759,8 +759,8 @@ bfad_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad) else sht = &bfad_im_vport_template; - if (max_xfer_size != BFAD_MAX_SECTORS >> 1) - sht->max_sectors = max_xfer_size << 1; + if (bfa_max_xfer_size != BFAD_MAX_SECTORS >> 1) + sht->max_sectors = bfa_max_xfer_size << 1; sht->sg_tablesize = bfad->cfg_data.io_max_sge; @@ -1065,7 +1065,7 @@ bfad_fc_host_init(struct bfad_im_port_s *im_port) memset(fc_host_supported_fc4s(host), 0, sizeof(fc_host_supported_fc4s(host))); - if (supported_fc4s & BFA_LPORT_ROLE_FCP_IM) + if (bfa_supported_fc4s & BFA_LPORT_ROLE_FCP_IM) /* For FCP type 0x08 */ fc_host_supported_fc4s(host)[2] = 1; /* For fibre channel services type 0x20 */