From patchwork Wed Sep 17 00:11:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 37495 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C03C42057E for ; Wed, 17 Sep 2014 00:12:13 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id ex7sf129263wid.8 for ; Tue, 16 Sep 2014 17:12:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=USBvqld9IWhf8CjhDjIqEbeOFKnNXcLU29gjCcd01co=; b=XKo075i4Qx08q/t65hQVkC6T+/MbJirV+8w9+JVFJ7hHGfEZXzRjGJql51qNuEFZsn lUwK5Yfny5A4Zlc7ZTLNTuXjRi5LMZW6SRrijtOwsydNQc1S2rENc/vRMbaqYH44bfl6 /U+S5cehH96s0Dt8nhVwwvTqEfckH8ETp0pWuP7jMV5T/j7gjHNMoQGzvR43u6Z9inJe csvbmEfwtDBtrZWU2wFVwNaEjgBw11ygvMDio+LqMXrVjpDniSKax68Swy91mHu/gF0b 0FzH5eIE95byFfUiFULErmYpXsiE7DydvLFuNtjLnurHG7jhWSW0xt5Bo9jLZm37HNgR qQ5Q== X-Gm-Message-State: ALoCoQlz2KR5Tp76xW54PUT6AVoO4leUhpOdw+HA5H4ztnfZYxtY0Uil0AR9JZkD3lIrgBWjpUJE X-Received: by 10.180.198.172 with SMTP id jd12mr7144935wic.6.1410912732999; Tue, 16 Sep 2014 17:12:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.171 with SMTP id p11ls46400lal.68.gmail; Tue, 16 Sep 2014 17:12:12 -0700 (PDT) X-Received: by 10.112.143.105 with SMTP id sd9mr38494361lbb.43.1410912732618; Tue, 16 Sep 2014 17:12:12 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by mx.google.com with ESMTPS id f7si26415287lab.30.2014.09.16.17.12.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Sep 2014 17:12:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id b12so810258lbj.25 for ; Tue, 16 Sep 2014 17:12:12 -0700 (PDT) X-Received: by 10.152.43.99 with SMTP id v3mr39059726lal.13.1410912732540; Tue, 16 Sep 2014 17:12:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp490770lbb; Tue, 16 Sep 2014 17:12:11 -0700 (PDT) X-Received: by 10.140.19.201 with SMTP id 67mr54797367qgh.28.1410912731493; Tue, 16 Sep 2014 17:12:11 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id p2si19462303qat.60.2014.09.16.17.12.10 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Sep 2014 17:12:11 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XU2qv-0007W1-MB; Wed, 17 Sep 2014 00:12:09 +0000 Received: from mail-qg0-f42.google.com ([209.85.192.42]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XU2qo-0007Vw-UJ for lng-odp@lists.linaro.org; Wed, 17 Sep 2014 00:12:02 +0000 Received: by mail-qg0-f42.google.com with SMTP id q107so906540qgd.29 for ; Tue, 16 Sep 2014 17:11:57 -0700 (PDT) X-Received: by 10.140.82.213 with SMTP id h79mr46896927qgd.51.1410912717723; Tue, 16 Sep 2014 17:11:57 -0700 (PDT) Received: from fedora1.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id h91sm13012854qge.38.2014.09.16.17.11.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Sep 2014 17:11:57 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Tue, 16 Sep 2014 20:11:33 -0400 Message-Id: <1410912693-31847-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] odp_packet_io.c: Fix unreachable code X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Mike Holmes --- Also fixed indentation platform/linux-generic/odp_packet_io.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 33ade10..78d5243 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -122,7 +122,7 @@ static void init_pktio_entry(pktio_entry_t *entry, odp_pktio_params_t *params) case ODP_PKTIO_TYPE_SOCKET_MMAP: memset(&entry->s.pkt_sock, 0, sizeof(entry->s.pkt_sock)); memset(&entry->s.pkt_sock_mmap, 0, - sizeof(entry->s.pkt_sock_mmap)); + sizeof(entry->s.pkt_sock_mmap)); break; #ifdef ODP_HAVE_NETMAP case ODP_PKTIO_TYPE_NETMAP: @@ -220,7 +220,7 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_buffer_pool_t pool, break; case ODP_PKTIO_TYPE_SOCKET_MMAP: res = setup_pkt_sock_mmap(&pktio_entry->s.pkt_sock_mmap, dev, - pool, params->sock_params.fanout); + pool, params->sock_params.fanout); if (res == -1) { close_pkt_sock_mmap(&pktio_entry->s.pkt_sock_mmap); free_pktio_entry(id); @@ -231,7 +231,7 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_buffer_pool_t pool, case ODP_PKTIO_TYPE_NETMAP: res = setup_pkt_netmap(&pktio_entry->s.pkt_nm, dev, - pool, ¶ms->nm_params); + pool, ¶ms->nm_params); if (res == -1) { close_pkt_netmap(&pktio_entry->s.pkt_nm); free_pktio_entry(id); @@ -275,8 +275,8 @@ int odp_pktio_close(odp_pktio_t id) break; #endif default: + res |= free_pktio_entry(id); break; - res |= free_pktio_entry(id); } } unlock_entry(entry); @@ -310,15 +310,15 @@ int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len) switch (pktio_entry->s.params.type) { case ODP_PKTIO_TYPE_SOCKET_BASIC: pkts = recv_pkt_sock_basic(&pktio_entry->s.pkt_sock, - pkt_table, len); + pkt_table, len); break; case ODP_PKTIO_TYPE_SOCKET_MMSG: pkts = recv_pkt_sock_mmsg(&pktio_entry->s.pkt_sock, - pkt_table, len); + pkt_table, len); break; case ODP_PKTIO_TYPE_SOCKET_MMAP: pkts = recv_pkt_sock_mmap(&pktio_entry->s.pkt_sock_mmap, - pkt_table, len); + pkt_table, len); break; #ifdef ODP_HAVE_NETMAP case ODP_PKTIO_TYPE_NETMAP: @@ -352,20 +352,20 @@ int odp_pktio_send(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len) switch (pktio_entry->s.params.type) { case ODP_PKTIO_TYPE_SOCKET_BASIC: pkts = send_pkt_sock_basic(&pktio_entry->s.pkt_sock, - pkt_table, len); + pkt_table, len); break; case ODP_PKTIO_TYPE_SOCKET_MMSG: pkts = send_pkt_sock_mmsg(&pktio_entry->s.pkt_sock, - pkt_table, len); + pkt_table, len); break; case ODP_PKTIO_TYPE_SOCKET_MMAP: pkts = send_pkt_sock_mmap(&pktio_entry->s.pkt_sock_mmap, - pkt_table, len); + pkt_table, len); break; #ifdef ODP_HAVE_NETMAP case ODP_PKTIO_TYPE_NETMAP: pkts = send_pkt_netmap(&pktio_entry->s.pkt_nm, - pkt_table, len); + pkt_table, len); break; #endif default: