From: David Marchand <david.marchand@6wind.com> To: dev@dpdk.org Subject: [dpdk-dev] [PATCH 4/7] eal: fix checkpatch issues before moving code Date: Mon, 22 Sep 2014 10:37:58 +0200 Message-ID: <1411375081-27986-5-git-send-email-david.marchand@6wind.com> (raw) In-Reply-To: <1411375081-27986-1-git-send-email-david.marchand@6wind.com> Signed-off-by: David Marchand <david.marchand@6wind.com> --- lib/librte_eal/bsdapp/eal/eal.c | 21 +++++++------------ lib/librte_eal/linuxapp/eal/eal.c | 42 +++++++++++++------------------------ 2 files changed, 21 insertions(+), 42 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 8599a35..81d1a65 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -613,30 +613,23 @@ eal_parse_args(int argc, char **argv) case 0: if (!strcmp(lgopts[option_index].name, OPT_NO_HUGE)) { internal_config.no_hugetlbfs = 1; - } - else if (!strcmp(lgopts[option_index].name, OPT_NO_PCI)) { + } else if (!strcmp(lgopts[option_index].name, OPT_NO_PCI)) { internal_config.no_pci = 1; - } - else if (!strcmp(lgopts[option_index].name, OPT_NO_HPET)) { + } else if (!strcmp(lgopts[option_index].name, OPT_NO_HPET)) { internal_config.no_hpet = 1; - } - else if (!strcmp(lgopts[option_index].name, OPT_VMWARE_TSC_MAP)) { + } else if (!strcmp(lgopts[option_index].name, OPT_VMWARE_TSC_MAP)) { internal_config.vmware_tsc_map = 1; - } - else if (!strcmp(lgopts[option_index].name, OPT_NO_SHCONF)) { + } else if (!strcmp(lgopts[option_index].name, OPT_NO_SHCONF)) { internal_config.no_shconf = 1; - } - else if (!strcmp(lgopts[option_index].name, OPT_PROC_TYPE)) { + } else if (!strcmp(lgopts[option_index].name, OPT_PROC_TYPE)) { internal_config.process_type = eal_parse_proc_type(optarg); - } - else if (!strcmp(lgopts[option_index].name, OPT_VDEV)) { + } else if (!strcmp(lgopts[option_index].name, OPT_VDEV)) { if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, optarg) < 0) { eal_usage(prgname); return -1; } - } - else if (!strcmp(lgopts[option_index].name, OPT_SYSLOG)) { + } else if (!strcmp(lgopts[option_index].name, OPT_SYSLOG)) { if (eal_parse_syslog(optarg) < 0) { RTE_LOG(ERR, EAL, "invalid parameters for --" OPT_SYSLOG "\n"); diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 655c454..3393550 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -839,8 +839,7 @@ eal_parse_args(int argc, char **argv) case 0: if (!strcmp(lgopts[option_index].name, OPT_NO_HUGE)) { internal_config.no_hugetlbfs = 1; - } - if (!strcmp(lgopts[option_index].name, OPT_XEN_DOM0)) { + } else if (!strcmp(lgopts[option_index].name, OPT_XEN_DOM0)) { #ifdef RTE_LIBRTE_XEN_DOM0 internal_config.xen_dom0_support = 1; #else @@ -849,44 +848,34 @@ eal_parse_args(int argc, char **argv) " RTE_LIBRTE_XEN_DOM0=y\n"); return -1; #endif - } - else if (!strcmp(lgopts[option_index].name, OPT_NO_PCI)) { + } else if (!strcmp(lgopts[option_index].name, OPT_NO_PCI)) { internal_config.no_pci = 1; - } - else if (!strcmp(lgopts[option_index].name, OPT_NO_HPET)) { + } else if (!strcmp(lgopts[option_index].name, OPT_NO_HPET)) { internal_config.no_hpet = 1; - } - else if (!strcmp(lgopts[option_index].name, OPT_VMWARE_TSC_MAP)) { + } else if (!strcmp(lgopts[option_index].name, OPT_VMWARE_TSC_MAP)) { internal_config.vmware_tsc_map = 1; - } - else if (!strcmp(lgopts[option_index].name, OPT_NO_SHCONF)) { + } else if (!strcmp(lgopts[option_index].name, OPT_NO_SHCONF)) { internal_config.no_shconf = 1; - } - else if (!strcmp(lgopts[option_index].name, OPT_HUGE_DIR)) { + } else if (!strcmp(lgopts[option_index].name, OPT_HUGE_DIR)) { internal_config.hugepage_dir = optarg; - } - else if (!strcmp(lgopts[option_index].name, OPT_PROC_TYPE)) { + } else if (!strcmp(lgopts[option_index].name, OPT_PROC_TYPE)) { internal_config.process_type = eal_parse_proc_type(optarg); - } - else if (!strcmp(lgopts[option_index].name, OPT_FILE_PREFIX)) { + } else if (!strcmp(lgopts[option_index].name, OPT_FILE_PREFIX)) { internal_config.hugefile_prefix = optarg; - } - else if (!strcmp(lgopts[option_index].name, OPT_SOCKET_MEM)) { + } else if (!strcmp(lgopts[option_index].name, OPT_SOCKET_MEM)) { if (eal_parse_socket_mem(optarg) < 0) { RTE_LOG(ERR, EAL, "invalid parameters for --" OPT_SOCKET_MEM "\n"); eal_usage(prgname); return -1; } - } - else if (!strcmp(lgopts[option_index].name, OPT_VDEV)) { + } else if (!strcmp(lgopts[option_index].name, OPT_VDEV)) { if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, optarg) < 0) { eal_usage(prgname); return -1; } - } - else if (!strcmp(lgopts[option_index].name, OPT_SYSLOG)) { + } else if (!strcmp(lgopts[option_index].name, OPT_SYSLOG)) { if (eal_parse_syslog(optarg) < 0) { RTE_LOG(ERR, EAL, "invalid parameters for --" OPT_SYSLOG "\n"); @@ -905,24 +894,21 @@ eal_parse_args(int argc, char **argv) return -1; } internal_config.log_level = log; - } - else if (!strcmp(lgopts[option_index].name, OPT_BASE_VIRTADDR)) { + } else if (!strcmp(lgopts[option_index].name, OPT_BASE_VIRTADDR)) { if (eal_parse_base_virtaddr(optarg) < 0) { RTE_LOG(ERR, EAL, "invalid parameter for --" OPT_BASE_VIRTADDR "\n"); eal_usage(prgname); return -1; } - } - else if (!strcmp(lgopts[option_index].name, OPT_VFIO_INTR)) { + } else if (!strcmp(lgopts[option_index].name, OPT_VFIO_INTR)) { if (eal_parse_vfio_intr(optarg) < 0) { RTE_LOG(ERR, EAL, "invalid parameters for --" OPT_VFIO_INTR "\n"); eal_usage(prgname); return -1; } - } - else if (!strcmp(lgopts[option_index].name, OPT_CREATE_UIO_DEV)) { + } else if (!strcmp(lgopts[option_index].name, OPT_CREATE_UIO_DEV)) { internal_config.create_uio_dev = 1; } else { RTE_LOG(ERR, EAL, "Option %s is not supported " -- 1.7.10.4
next prev parent reply other threads:[~2014-09-22 8:32 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-09-22 8:37 [dpdk-dev] [PATCH 0/7] cleanup option parsing in bsd/linux eal David Marchand 2014-09-22 8:37 ` [dpdk-dev] [PATCH 1/7] eal: remove unused --use-device option David Marchand 2014-09-22 12:22 ` Neil Horman 2014-09-22 13:49 ` David Marchand 2014-09-22 8:37 ` [dpdk-dev] [PATCH 2/7] eal: factorise unsupported option handling David Marchand 2014-09-22 8:37 ` [dpdk-dev] [PATCH 3/7] eal: remove duplicate handling of white/black list David Marchand 2014-09-22 8:37 ` David Marchand [this message] 2014-09-22 8:37 ` [dpdk-dev] [PATCH 5/7] eal: merge bsd and linux common options parsing David Marchand 2014-09-22 8:38 ` [dpdk-dev] [PATCH 6/7] eal: rework long " David Marchand 2014-09-22 12:42 ` Neil Horman 2014-09-22 8:38 ` [dpdk-dev] [PATCH 7/7] eal: indent files David Marchand 2014-09-22 12:43 ` [dpdk-dev] [PATCH 0/7] cleanup option parsing in bsd/linux eal Neil Horman 2014-09-23 15:37 ` Thomas Monjalon
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1411375081-27986-5-git-send-email-david.marchand@6wind.com \ --to=david.marchand@6wind.com \ --cc=dev@dpdk.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git