From patchwork Thu Jan 11 19:01:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 859245 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zHZxh11qlz9sPk for ; Fri, 12 Jan 2018 06:02:16 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 9578F1040; Thu, 11 Jan 2018 19:02:14 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id DF0F4102A for ; Thu, 11 Jan 2018 19:02:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 461FE51E for ; Thu, 11 Jan 2018 19:02:12 +0000 (UTC) X-Originating-IP: 98.234.50.139 Received: from localhost.localdomain (unknown [98.234.50.139]) (Authenticated sender: jpettit@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 22D5241C087 for ; Thu, 11 Jan 2018 20:02:09 +0100 (CET) From: Justin Pettit To: dev@openvswitch.org Date: Thu, 11 Jan 2018 11:01:23 -0800 Message-Id: <1515697283-63206-1-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] odp-util: Fix Sparse warning in parse_odp_userspace_action(). X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Sparse complains with warning: incorrect type in argument 1 (different base types) in function parse_odp_userspace_action due to a call to htonll(rule_cookie). The variable is read in host-byte order, so it shouldn't have been declared as big-endian. Fixes: d39ec23de384 ("ofproto-dpif: Don't slow-path controller actions.") Reported-by: Ian Stokes Signed-off-by: Justin Pettit Acked-by: Ben Pfaff Acked-by: Ian Stokes Tested-by: Ian Stokes --- lib/odp-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index f8c84e17330f..0b836569fdc5 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -1151,7 +1151,7 @@ parse_odp_userspace_action(const char *s, struct ofpbuf *actions) uint8_t continuation; uint16_t reason; uint32_t recirc_id; - ovs_be64 rule_cookie; + uint64_t rule_cookie; uint16_t controller_id; uint16_t max_len;