From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B6EA84C90 for ; Fri, 5 Oct 2018 10:39:13 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Oct 2018 01:39:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,343,1534834800"; d="scan'208";a="238715134" Received: from nikhilr-mobl1.amr.corp.intel.com (HELO [10.106.158.81]) ([10.106.158.81]) by orsmga004.jf.intel.com with ESMTP; 05 Oct 2018 01:38:51 -0700 To: Ferruh Yigit , Reshma Pattan , Hemant Agrawal , Shreyansh Jain , Ashish Gupta , Fiona Trahe , Pablo de Lara , Akhil Goyal , Declan Doherty , Fan Zhang , Jerin Jacob , Chas Williams , Rahul Lakkireddy , John Daley , Hyong Youb Kim , Gaetan Rivet , Qi Zhang , Xiao Wang , Beilei Xing , Wenzhuo Lu , Konstantin Ananyev , Rasesh Mody , Harish Patil Cc: dev@dpdk.org, "Rao, Nikhil" References: <20181004034047.26824-1-ferruh.yigit@intel.com> From: "Rao, Nikhil" Message-ID: Date: Fri, 5 Oct 2018 14:08:50 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181004034047.26824-1-ferruh.yigit@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] fix static 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: Fri, 05 Oct 2018 08:39:14 -0000 On 10/4/2018 9:10 AM, Ferruh Yigit wrote: > Make variables static as much as possible. > > For the ones can't be done static, prefix the variable name with > component name. > > Also some cleanup and fix done related static usage while around. > > Signed-off-by: Ferruh Yigit > --- > app/pdump/main.c | 6 +-- > drivers/bus/dpaa/base/fman/netcfg_layer.c | 2 +- > drivers/bus/dpaa/dpaa_bus.c | 4 +- > drivers/bus/dpaa/include/fsl_fman_crc64.h | 8 ++-- > drivers/bus/vdev/vdev.c | 2 +- > drivers/compress/octeontx/include/zip_regs.h | 4 +- > drivers/compress/octeontx/otx_zip.h | 6 +-- > drivers/compress/octeontx/otx_zip_pmd.c | 2 +- > drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +- > drivers/crypto/dpaa_sec/dpaa_sec.c | 2 +- > drivers/crypto/null/null_crypto_pmd_ops.c | 2 +- > .../scheduler/rte_cryptodev_scheduler.c | 26 +++++----- > .../scheduler/rte_cryptodev_scheduler.h | 8 ++-- > drivers/crypto/scheduler/scheduler_failover.c | 6 +-- > .../crypto/scheduler/scheduler_multicore.c | 6 +-- > .../scheduler/scheduler_pkt_size_distr.c | 6 +-- > drivers/crypto/scheduler/scheduler_pmd.c | 8 ++-- > drivers/crypto/scheduler/scheduler_pmd_ops.c | 2 +- > .../crypto/scheduler/scheduler_pmd_private.h | 2 +- > .../crypto/scheduler/scheduler_roundrobin.c | 6 +-- > drivers/event/octeontx/ssovf_evdev.c | 3 +- > drivers/mempool/dpaa/dpaa_mempool.c | 2 +- > drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- > drivers/net/bonding/rte_eth_bond_8023ad.c | 48 +++++++++---------- > .../net/bonding/rte_eth_bond_8023ad_private.h | 2 +- > drivers/net/bonding/rte_eth_bond_pmd.c | 12 ++--- > drivers/net/cxgbe/cxgbe_flow.c | 2 +- > drivers/net/enic/enic_ethdev.c | 1 - > drivers/net/failsafe/failsafe.c | 4 +- > drivers/net/failsafe/failsafe_args.c | 10 ++-- > drivers/net/failsafe/failsafe_private.h | 4 +- > drivers/net/fm10k/fm10k_ethdev.c | 6 +-- > drivers/net/i40e/base/i40e_diag.c | 2 +- > drivers/net/i40e/base/i40e_diag.h | 2 - > drivers/net/i40e/i40e_flow.c | 4 +- > drivers/net/i40e/i40e_vf_representor.c | 2 +- > drivers/net/ifc/ifcvf_vdpa.c | 2 +- > drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +- > drivers/net/qede/base/bcm_osal.c | 2 +- > drivers/net/qede/base/ecore_sriov.c | 10 ++-- > drivers/net/qede/base/ecore_vf.c | 6 +-- > drivers/net/qede/base/ecore_vfpf_if.h | 2 +- > drivers/net/qede/qede_ethdev.c | 4 +- > drivers/net/qede/qede_ethdev.h | 2 +- > drivers/net/qede/qede_main.c | 13 ++--- > drivers/net/sfc/sfc_rx.c | 2 +- > drivers/net/softnic/rte_eth_softnic.c | 2 +- > drivers/net/tap/tap_bpf_insns.h | 4 +- > drivers/net/tap/tap_flow.c | 2 +- > drivers/net/virtio/virtio_user/vhost.h | 4 +- > drivers/net/virtio/virtio_user/vhost_kernel.c | 2 +- > drivers/net/virtio/virtio_user/vhost_user.c | 2 +- > .../net/virtio/virtio_user/virtio_user_dev.c | 6 +-- > drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 4 +- > .../raw/ifpga_rawdev/base/ifpga_enumerate.c | 8 ++-- > .../raw/ifpga_rawdev/base/ifpga_feature_dev.h | 8 ++-- > drivers/raw/ifpga_rawdev/base/ifpga_port.c | 6 +-- > .../raw/ifpga_rawdev/base/ifpga_port_error.c | 2 +- > drivers/raw/skeleton_rawdev/skeleton_rawdev.c | 2 +- > lib/librte_compressdev/rte_compressdev.c | 32 ++++++------- > lib/librte_compressdev/rte_compressdev_pmd.h | 5 -- > lib/librte_cryptodev/rte_cryptodev.c | 34 +++++++------ > lib/librte_cryptodev/rte_cryptodev_pmd.h | 3 -- > lib/librte_eal/common/eal_common_bus.c | 2 +- > lib/librte_eal/common/eal_common_class.c | 2 +- > lib/librte_eal/common/eal_common_devargs.c | 2 +- > lib/librte_eal/linuxapp/eal/eal_memalloc.c | 2 +- > lib/librte_ethdev/rte_class_eth.c | 2 +- > lib/librte_ethdev/rte_ethdev.c | 2 +- > .../rte_event_eth_rx_adapter.c | 1 - > lib/librte_eventdev/rte_eventdev.c | 10 ++-- > lib/librte_eventdev/rte_eventdev_pmd.h | 4 +- > lib/librte_net/net_crc_sse.h | 4 +- > lib/librte_rawdev/rte_rawdev.c | 10 ++-- > 74 files changed, 203 insertions(+), 225 deletions(-) > > diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > index 870ac8c3b..71d008cd1 100644 > --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > @@ -1125,7 +1125,6 @@ rxa_poll(struct rte_event_eth_rx_adapter *rx_adapter) > wrr_pos = rx_adapter->wrr_pos; > max_nb_rx = rx_adapter->max_nb_rx; > buf = &rx_adapter->event_enqueue_buffer; > - stats = &rx_adapter->stats; > > /* Iterate through a WRR sequence */ > for (num_queue = 0; num_queue < rx_adapter->wrr_len; num_queue++) { > diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h > index 792fb3a23..aa6e52c63 100644 > --- a/lib/librte_eventdev/rte_eventdev_pmd.h > +++ b/lib/librte_eventdev/rte_eventdev_pmd.h > @@ -467,7 +467,7 @@ typedef int (*eventdev_eth_rx_adapter_caps_get_t) > const struct rte_eth_dev *eth_dev, > uint32_t *caps); > > -struct rte_event_eth_rx_adapter_queue_conf *queue_conf; > +struct rte_event_eth_rx_adapter_queue_conf; > > /** > * Retrieve the event device's timer adapter capabilities, as well as the ops > @@ -592,7 +592,7 @@ typedef int (*eventdev_eth_rx_adapter_stop_t) > (const struct rte_eventdev *dev, > const struct rte_eth_dev *eth_dev); > > -struct rte_event_eth_rx_adapter_stats *stats; > +struct rte_event_eth_rx_adapter_stats; > Reviewed-by: Nikhil Rao