From patchwork Fri Jun 20 17:46:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 32290 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f71.google.com (mail-qg0-f71.google.com [209.85.192.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 54301203C2 for ; Fri, 20 Jun 2014 17:46:49 +0000 (UTC) Received: by mail-qg0-f71.google.com with SMTP id f51sf8721196qge.2 for ; Fri, 20 Jun 2014 10:46: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: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=NsbOvrYFU4UxAxCqylPsrnHNCt7LLmSlWBO74SJb8TU=; b=YKVaixKw35ViVgxyavirF0U2bi9wnL+j9oagqcVmCFZeC5kpVd0HZO9ZwzBjaCl8ry QkIrs1AFsMNEHlZllptGeztcTfhLjxwNwHlYP2AVZs7QU8utEfbAs2MHXl9U1B468KrX +LDb06Uodgv/bPVQ7+xGTq0mIhzEJr2Kz0ek3h8sU/ZX3MZ6otndLhvi4u5V6No9uovg N7G1I4Gyw0zuhMGnanF26NQqS3qCWVTMoKiIyCjeU/h150ZFF0D05ZwKTGODnWmk7bAm lv7k9fCrB0tiyWteVA5+ufE2XxU+ixp3StN0A/wYh2gF5bgyKY3aTLLlWfzZ6F/ttP0d Xqkw== X-Gm-Message-State: ALoCoQmR1+UoBU81K0R75hrPPTmsCe/T9R8gWP6VJ+4wjvTVW3hC3duZ27D/ZOpZ7dVyABPhbMX7 X-Received: by 10.58.151.201 with SMTP id us9mr1887549veb.23.1403286408962; Fri, 20 Jun 2014 10:46:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.103.118 with SMTP id x109ls1112425qge.74.gmail; Fri, 20 Jun 2014 10:46:48 -0700 (PDT) X-Received: by 10.220.80.70 with SMTP id s6mr2035223vck.44.1403286408798; Fri, 20 Jun 2014 10:46:48 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id b5si4512297vec.50.2014.06.20.10.46.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Jun 2014 10:46:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id ij19so3711925vcb.36 for ; Fri, 20 Jun 2014 10:46:48 -0700 (PDT) X-Received: by 10.52.52.168 with SMTP id u8mr3689093vdo.25.1403286408716; Fri, 20 Jun 2014 10:46: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.221.37.5 with SMTP id tc5csp40066vcb; Fri, 20 Jun 2014 10:46:48 -0700 (PDT) X-Received: by 10.140.30.195 with SMTP id d61mr6911797qgd.62.1403286408292; Fri, 20 Jun 2014 10:46:48 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id v32si3039508qgv.53.2014.06.20.10.46.47 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Jun 2014 10:46:48 -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-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wy2s0-0002ot-1Z; Fri, 20 Jun 2014 17:45:00 +0000 Received: from mail-qg0-f48.google.com ([209.85.192.48]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wy2rt-0002oj-RM for lng-odp@lists.linaro.org; Fri, 20 Jun 2014 17:44:53 +0000 Received: by mail-qg0-f48.google.com with SMTP id q108so3742356qgd.35 for ; Fri, 20 Jun 2014 10:46:36 -0700 (PDT) X-Received: by 10.140.95.105 with SMTP id h96mr6873577qge.2.1403286395974; Fri, 20 Jun 2014 10:46:35 -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 j1sm14693535qaa.11.2014.06.20.10.46.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jun 2014 10:46:35 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Fri, 20 Jun 2014 13:46:18 -0400 Message-Id: <1403286379-52829-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH 1/2] Match types for odp_udphdr_t with chksum fuctions 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.220.177 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 odp_udphdr_t.chksum can now be assigned from odp_ipv4_udp_chksum() and odp_chksum() without a sparse warning for different base types typedef struct ODP_PACKED { uint16be_t src_port; /**< Source port */ uint16be_t dst_port; /**< Destination port */ uint16be_t length; /**< UDP datagram length in bytes (header+data) */ uint16be_t chksum; /**< UDP header and data checksum (0 if not used)*/ } odp_udphdr_t; Signed-off-by: Mike Holmes --- include/helper/odp_chksum.h | 2 +- include/helper/odp_udp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/helper/odp_chksum.h b/include/helper/odp_chksum.h index 12ef61f..b2455f6 100644 --- a/include/helper/odp_chksum.h +++ b/include/helper/odp_chksum.h @@ -27,7 +27,7 @@ extern "C" { * * @return checksum value */ -static inline uint16_t odp_chksum(void *buffer, int len) +static inline uint16be_t odp_chksum(void *buffer, int len) { uint16_t *buf = buffer; unsigned int sum = 0; diff --git a/include/helper/odp_udp.h b/include/helper/odp_udp.h index 5aedb36..8adfc78 100644 --- a/include/helper/odp_udp.h +++ b/include/helper/odp_udp.h @@ -50,7 +50,7 @@ typedef struct ODP_PACKET { * @param pkt calculate chksum for pkt * @return checksum value */ -static inline uint16_t odp_ipv4_udp_chksum(odp_packet_t pkt) +static inline uint16be_t odp_ipv4_udp_chksum(odp_packet_t pkt) { uint32_t sum = 0; odp_udpphdr_t phdr;