From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30073.outbound.protection.outlook.com [40.107.3.73]) by dpdk.org (Postfix) with ESMTP id DC6461B5EF for ; Wed, 4 Jul 2018 11:45:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DoMIZs2eX5RH1Grvprfh3Z+pf+X8dcErySbnJWwOk0A=; b=TUP4Wj65CL+RD96jlclqXrFXgk1n2Rhbwdc6UtOofa2qnLmHHahRgcworWRdigADc8ebpHZs4DAOWRkLCW5njQF1oZXz61LLW/ShKz1CWytGr0kyca3JdvFxSPOQ+8DtbkuLen1HX/Nmo3XJ9M7DMj0CuRTSTDi6ScqqXZTf/K0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.25; Wed, 4 Jul 2018 09:45:37 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: Pavan Nikhilesh Date: Wed, 4 Jul 2018 15:13:46 +0530 Message-Id: <1530697431-1244-11-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530697431-1244-1-git-send-email-hemant.agrawal@nxp.com> References: <1529574244-18997-1-git-send-email-hemant.agrawal@nxp.com> <1530697431-1244-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR0101CA0008.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::18) To DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e0b920e9-2a1e-4616-242d-08d5e192e5c6 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB4PR04MB0765; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 3:5Q3ZJNFvYX7A+9KnNRolD1/ukm/89gvuWJ00UQTBUzLq2yJ4yuhYfBLXU/DU6DV4oIGU9BFf72r7gy0q4ZrdvFqoKpTskBZtG0HgSKxpsoKUgrF+H7PgIfrH+Ea4XfLCdXK7hthiPesaLlAtNi4NKVFth05RaEcTwLHlTKNTZ1pKH+2+RqGdkMWKYgwVl77aIXdoKTIF/X0vazT7r1G6OTGJ0diUmoJ+OkaFxm/ZReuyZZhHPon1g5uFEl/IxsnL; 25:lAA3BZtnxT1DqDxDW6W/uuapsPLuesP2JSpyGczIQIC0Z50ymBzzt4ZvqNhqMd08xnjjtZVng/vUDx1zoz8kVuelDr3E/HOnjH/j3QhwD+MJXK7yh1P5/xJRT8c0g5MPlEkmIQLZVeZy5iBGlvxl7JvvcfKU84NUX3Gfzm4GUd/H05R0gEzAV5tdtzMa4EpuwvDl5ew6VPAZEo+xNEPDdMKZ03/3meWkXKlB5MqkDdEFo9BFyE4eHt7QFKGTVbldA3JIY7tvXs7WEqNRtFcrQTaYaGV8YzoiQxHGOLh3R2FlXqVUjc4nqrB7snATKgIZ4dj9mFVqGpQ9Fe+RbcR8XA==; 31:8zOrH5KfBe9GTsUVQnO6kXY9+Y9L/aTGB5TrWomfqDrE4KLTBnvdbdkIfZIQ9ytjX4gDLw3LOJ6ymW1jInCFyRCCnmpUe8gBXcPwr9vCgB2oWwjL6WkQ0rgGwJ3LIojVuGBgsGC2ywUGRrposHVUzFHucWneb8MM8DJ8/CQE/J+bAIsfC1AFDq+za0YZFOS2ofIxgCvJyflK2a1voljpCbgv6N7Ec63o8LSzGA4ZS80= X-MS-TrafficTypeDiagnostic: DB4PR04MB0765: X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 20:Qsv7OJGIFURuvH+vgYj+Ed/0GhppPTTSgCmtNk4oT0iy3r74cT6oQm7rixy0Bpm9zwhBq75RSA95+LkVCiV9ZUgCrt5FonWXvIDPpysc7OKkwwGOpk0jI4vTbGdXqz7ZHJmjUEJRViJm8tnCq1Mc9gFcudNvVhUUvxwVpZi6VSAn225p+GGG1mIpY6wB70tfplQNyi2qaTM6Iqqi6R+b49tMALsbgjqnejFBaz0ZJEjV+c8IEhXdLr6pGNDBxfXpPur7e392LC3q48P54wygsaWarQgqVySfFp4BP49nGg24vj0TkWAJrMf1H51JdhlitHu8WEz12S8JA/6QR+5D+XJ8XVb/eiwV26D554ecaIHRK5/uksVZ6cfaQUAp2x2ZeUiXp+YGvGXq3EOh8i5J+1CvApFRZ7GBIkx+0zeFjoV3aWqm1lplGyZGjx2BAo+u9zm3GBj15YQMF6aQJj1SCLji+14h5UuWF3Qw9DTM6ZQsfapzUtYWRm3Bo516aCGw; 4:lKHghVVFoMBjhsYPnCFpZI7QBZBRJKYW1YRIbKHwHL8HUePMTHASN1Cu4oBVc2jRI41suVMr0/8WrJkFusJHmOBOjtIQ3K5fYSi3VvD/uHhpLul9HASSizd9MpBRzJuvNkPijIx/0votWIvz/76YCH6Qa733SvBSFHdIcLqBbbgJowSzTg8qZKk9Nlj2urTIjEEzd2X9WJkpvM0RDeNEEVmiGZsK+pPYY+30OBvuqlEX4droqppGpKJTIdAoGvja+DO7EJcztE05a1FSFuIa+DGUFcG9HDfLF3OsqssSh2aJYaVUZCnldy1NR4J+EkxovTW2QlnRXAa8QAquasQv2I9JSOzgIwcUPSkb3yx4KCE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DB4PR04MB0765; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0765; X-Forefront-PRVS: 0723A02764 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(376002)(136003)(346002)(366004)(199004)(189003)(6512007)(11346002)(476003)(386003)(6506007)(4326008)(55236004)(956004)(2616005)(5660300001)(44832011)(105586002)(68736007)(16526019)(53936002)(446003)(50226002)(316002)(6666003)(5009440100003)(36756003)(16586007)(2351001)(6916009)(106356001)(14444005)(186003)(86362001)(26005)(6486002)(97736004)(305945005)(81166006)(7736002)(8936002)(66066001)(8676002)(478600001)(25786009)(51416003)(486006)(76176011)(3846002)(6116002)(81156014)(48376002)(50466002)(52116002)(2906002)(47776003)(2361001)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0765; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB4PR04MB0765; 23:VSNGP/2qGS7biWyIOzZn4Tw5sjhp6q1cXAUG9kv7r?= =?us-ascii?Q?Rh/9zZLdLCFZaVD5ztceweQmmjal6g2HfTWbXfQ/qx7zKlUYlQkgTQTzzSUJ?= =?us-ascii?Q?BHO5ApUNqghp+qWGrzIPWTlD7EFZ4fdxz5xFjozWfsvZmuZI+IAF7RBWbP1O?= =?us-ascii?Q?GggSjusjh5rAcWLs8YHfpWokvMvta9/kJIaTjNrMD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453MYtmR0Rw0B4yDBOxb5ezbY0XowLhjaKbXu/MCDzhAbKNhfMFUMRLMALVNeOsCRRRsslua6I6cuXpyfCQir35TvLdzfkFDvUL2wBuRPgStPM0f+q8gobs5z8TqZrGvRPAZDmbfgWDIQ==; 5:BWRnl1fYRsmtfWjRjglWZGOwyO1lbkT5qJeGlJIebvUkgBnSp7ghzrpnSDJsYLQE7oHGDIZ5vx3wIWEEgBLEEQxQm94SFdDM/eGo5J5mMgrmAxKhoV+ejkOmNVTTCVqpmFtoxHbgrfmoc5Sd8r0v0AAzduSk+oD1AhnImPCTI2g=; 24:JQqpMsyh9riBjf208Eydo8A7Zn7YlCGVHgtY12XnxvFKY1cE1wKhbZo7uR4ZTFYFCMMlZT80t6PcZ75zy4RqmqHwJ9KY4tETmt+Aub2+qjY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 7:ILRQc5igGHjqxtkLnEY3N8fweIIfImSlL0Mleyt3sYoK0mEzeZliYHBmAXYEmBzh0X0PgqbzdZsQyYocTAvwFPB/VwUTt2l5xEN8f01sefuUdX0+SGMxQYEYXm1KMybpGY2gUy9cn4UKqDkvlYBoeoaOmcu623xEDPiDNHPdYQgLKnam3ScGtZeJGHDV1BS32BOyADSfnzBQAxpmjj5b7bjPKw4dawl4qPh7FjlEqoS2dPX68kti2UKDy/JQbKh4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2018 09:45:37.3221 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0b920e9-2a1e-4616-242d-08d5e192e5c6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0765 Subject: [dpdk-dev] [PATCH v2 11/16] bus/dpaa: cleanup unnecessary global variables X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2018 09:45:39 -0000 Changes originally in the patch "drivers: cleanup unnecessary global variables" by Pavan. Signed-off-by: Pavan Nikhilesh Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/fman/netcfg_layer.c | 5 ----- drivers/bus/dpaa/base/qbman/bman_driver.c | 4 ++-- drivers/bus/dpaa/base/qbman/qman.c | 2 +- drivers/bus/dpaa/base/qbman/qman_driver.c | 4 ++-- drivers/bus/dpaa/base/qbman/qman_priv.h | 1 - drivers/bus/dpaa/dpaa_bus.c | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/netcfg_layer.c b/drivers/bus/dpaa/base/fman/netcfg_layer.c index 3e956ce..031c6f1 100644 --- a/drivers/bus/dpaa/base/fman/netcfg_layer.c +++ b/drivers/bus/dpaa/base/fman/netcfg_layer.c @@ -18,11 +18,6 @@ #include #include -/* Structure contains information about all the interfaces given by user - * on command line. - */ -struct netcfg_interface *netcfg_interface; - /* This data structure contaings all configurations information * related to usages of DPA devices. */ diff --git a/drivers/bus/dpaa/base/qbman/bman_driver.c b/drivers/bus/dpaa/base/qbman/bman_driver.c index 1381da3..b14b590 100644 --- a/drivers/bus/dpaa/base/qbman/bman_driver.c +++ b/drivers/bus/dpaa/base/qbman/bman_driver.c @@ -15,9 +15,9 @@ /* * Global variables of the max portal/pool number this bman version supported */ -u16 bman_ip_rev; +static u16 bman_ip_rev; u16 bman_pool_max; -void *bman_ccsr_map; +static void *bman_ccsr_map; /*****************/ /* Portal driver */ diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index f5fe5ef..7c17027 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -625,7 +625,7 @@ struct qman_portal *qman_create_portal( #define MAX_GLOBAL_PORTALS 8 static struct qman_portal global_portals[MAX_GLOBAL_PORTALS]; -rte_atomic16_t global_portals_used[MAX_GLOBAL_PORTALS]; +static rte_atomic16_t global_portals_used[MAX_GLOBAL_PORTALS]; static struct qman_portal * qman_alloc_global_portal(void) diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c index 07b29d5..f6ecd6b 100644 --- a/drivers/bus/dpaa/base/qbman/qman_driver.c +++ b/drivers/bus/dpaa/base/qbman/qman_driver.c @@ -20,9 +20,9 @@ u16 qm_channel_caam = QMAN_CHANNEL_CAAM; u16 qm_channel_pme = QMAN_CHANNEL_PME; /* Ccsr map address to access ccsrbased register */ -void *qman_ccsr_map; +static void *qman_ccsr_map; /* The qman clock frequency */ -u32 qman_clk; +static u32 qman_clk; static __thread int qmfd = -1; static __thread struct qm_portal_config qpcfg; diff --git a/drivers/bus/dpaa/base/qbman/qman_priv.h b/drivers/bus/dpaa/base/qbman/qman_priv.h index 9e4471e..02f6301 100644 --- a/drivers/bus/dpaa/base/qbman/qman_priv.h +++ b/drivers/bus/dpaa/base/qbman/qman_priv.h @@ -139,7 +139,6 @@ struct qm_portal_config { #define QMAN_REV31 0x0301 #define QMAN_REV32 0x0302 extern u16 qman_ip_rev; /* 0 if uninitialised, otherwise QMAN_REVx */ -extern u32 qman_clk; int qm_set_wpm(int wpm); int qm_get_wpm(int *wpm); diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 7956bd0..5ba3d28 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -50,7 +50,7 @@ struct rte_dpaa_bus rte_dpaa_bus; struct netcfg_info *dpaa_netcfg; /* define a variable to hold the portal_key, once created.*/ -pthread_key_t dpaa_portal_key; +static pthread_key_t dpaa_portal_key; unsigned int dpaa_svr_family; -- 2.7.4