From patchwork Thu Jan 11 17:58:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Stokes, Ian" X-Patchwork-Id: 859220 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 3zHYXt3MFJz9ryQ for ; Fri, 12 Jan 2018 04:59:10 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 82B67D0B; Thu, 11 Jan 2018 17:59:04 +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 BE8B0BF0 for ; Thu, 11 Jan 2018 17:59:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 32B84564 for ; Thu, 11 Jan 2018 17:59:02 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2018 09:59:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,345,1511856000"; d="scan'208";a="20853309" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by fmsmga001.fm.intel.com with ESMTP; 11 Jan 2018 09:59:00 -0800 From: Ian Stokes To: dev@openvswitch.org Date: Thu, 11 Jan 2018 17:58:58 +0000 Message-Id: <1515693538-28789-1-git-send-email-ian.stokes@intel.com> X-Mailer: git-send-email 1.7.0.7 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD 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 1/1] odp-util: Fix Sparse warning. 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). Rule_cookie variable is already ovs_be64 so fix this by removing the call to htonll as there is no need to convert for use with put_32aligned_be64(). CC: Justin Pettit Fixes: d39ec23de384 ("ofproto-dpif: Don't slow-path controller actions.") Signed-off-by: Ian Stokes --- lib/odp-util.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index f8c84e1..fa1a5c9 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -1245,8 +1245,7 @@ parse_odp_userspace_action(const char *s, struct ofpbuf *actions) cookie.controller.continuation = continuation ? true : false; cookie.controller.reason = reason; cookie.controller.recirc_id = recirc_id; - put_32aligned_be64(&cookie.controller.rule_cookie, - htonll(rule_cookie)); + put_32aligned_be64(&cookie.controller.rule_cookie, rule_cookie); cookie.controller.controller_id = controller_id; cookie.controller.max_len = max_len; } else if (ovs_scan(&s[n], ",userdata(%n", &n1)) {