From patchwork Fri Jun 26 11:09:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50342 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BE19B228FD for ; Fri, 26 Jun 2015 11:14:50 +0000 (UTC) Received: by lbcak1 with SMTP id ak1sf25832767lbc.2 for ; Fri, 26 Jun 2015 04:14:49 -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:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=jPVIB3hoMqWp8AeuSDeTLjfVrgA+4KO1VtBCBYrjP0g=; b=Bem9SpCH+A8B/DUtUHlir7dYDcuwiJsKFmp5Sottih4Vp2+T7FXuKBWPc5/zJmemQU ZiMGD9kLQmC/6X4cSF9TllwJE2IMFNcoFeiupQx9MyGa/nV7s11ZoVLCcfuGis8IfAGt 5qlJOrioPiiUSNigWgbkBji2nkaXdQqUuvJEEIaKq0FDR1uPN17vNDT1szzoAL28sAIB T/VfT0RRMi2KIVzmnWxC8Rd0ZBgDUhoQwSFzK+kYKGEJvPQyiwN9vglnXmCSh5tFC3nQ Se7XIknb3IS4JsZ+RXWFC2q9IexoUYPBSkp3dGqsKOIFeWLgAjS2cfEbw6bX4g1San0s pNzw== X-Gm-Message-State: ALoCoQkHhz3DG4xPD2AbdRwirpSHbyIgNEiBhrUgxKP754VR1DXaMm655Ok3ye3HiInD0PIA7w/v X-Received: by 10.152.37.101 with SMTP id x5mr777741laj.5.1435317288829; Fri, 26 Jun 2015 04:14:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.138 with SMTP id am10ls412331lac.67.gmail; Fri, 26 Jun 2015 04:14:48 -0700 (PDT) X-Received: by 10.152.9.137 with SMTP id z9mr1130201laa.68.1435317288609; Fri, 26 Jun 2015 04:14:48 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id nx8si27130218lbb.161.2015.06.26.04.14.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2015 04:14:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lagx9 with SMTP id x9so61596174lag.1 for ; Fri, 26 Jun 2015 04:14:48 -0700 (PDT) X-Received: by 10.152.6.69 with SMTP id y5mr1108457lay.72.1435317288181; Fri, 26 Jun 2015 04:14:48 -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.108.230 with SMTP id hn6csp1243098lbb; Fri, 26 Jun 2015 04:14:47 -0700 (PDT) X-Received: by 10.140.25.208 with SMTP id 74mr1273231qgt.104.1435317286712; Fri, 26 Jun 2015 04:14:46 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r64si32549403qkh.110.2015.06.26.04.14.45; Fri, 26 Jun 2015 04:14:46 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id CED3662103; Fri, 26 Jun 2015 11:14:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 6D8D7620F9; Fri, 26 Jun 2015 11:12:52 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 5101262109; Fri, 26 Jun 2015 11:12:43 +0000 (UTC) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by lists.linaro.org (Postfix) with ESMTPS id 3446D62105 for ; Fri, 26 Jun 2015 11:09:59 +0000 (UTC) Received: by lbnk3 with SMTP id k3so62348967lbn.1 for ; Fri, 26 Jun 2015 04:09:57 -0700 (PDT) X-Received: by 10.152.6.105 with SMTP id z9mr1070335laz.98.1435316997639; Fri, 26 Jun 2015 04:09:57 -0700 (PDT) Received: from erachmi-VirtualBox.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by mx.google.com with ESMTPSA id ja1sm8073835lbc.38.2015.06.26.04.09.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jun 2015 04:09:56 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Fri, 26 Jun 2015 13:09:39 +0200 Message-Id: <1435316981-22355-4-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435316981-22355-1-git-send-email-christophe.milard@linaro.org> References: <1435316981-22355-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 3/5] validation: cosmetic changes in odp_packet.c X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 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" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christophe.milard@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.215.43 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 To please check-patch as much as possible before the file gets moved (and rechecked by check-odp) Note that CU_ASSERT (xxx != NULL) cannot be written CU_ASSERT(xxx), as CU_ASSERT expects an int as parameter. Casting would sureley work, but really is CU_ASSERT((int)(x)) clearer than CU_ASSERT (x != NULL) ? Also, braces are required in if/then/else with CU_ASSERT macro. Signed-off-by: Christophe Milard --- test/validation/odp_packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/validation/odp_packet.c b/test/validation/odp_packet.c index e9a022c..9150a16 100644 --- a/test/validation/odp_packet.c +++ b/test/validation/odp_packet.c @@ -145,6 +145,7 @@ static void packet_test_event_conversion(void) static void packet_test_basic_metadata(void) { odp_packet_t pkt = test_packet; + CU_ASSERT(odp_packet_head(pkt) != NULL); CU_ASSERT(odp_packet_data(pkt) != NULL); @@ -317,6 +318,7 @@ static void _verify_tailroom_shift(odp_packet_t pkt, if (shift >= 0) { uint32_t l2_off, l3_off, l4_off; + l2_off = odp_packet_l2_offset(pkt); l3_off = odp_packet_l3_offset(pkt); l4_off = odp_packet_l4_offset(pkt); @@ -390,7 +392,6 @@ static void packet_test_segments(void) CU_ASSERT(num_segs == 1); } - seg = odp_packet_first_seg(pkt); buf_len = 0; data_len = 0; @@ -556,7 +557,6 @@ free_packet: odp_packet_free(pkt); } - #define COMPARE_INFLAG(p1, p2, flag) \ CU_ASSERT(odp_packet_has_##flag(p1) == odp_packet_has_##flag(p2))