From patchwork Wed Feb 4 21:31:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 436490 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0950E14014D for ; Thu, 5 Feb 2015 08:32:02 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932910AbbBDVb5 (ORCPT ); Wed, 4 Feb 2015 16:31:57 -0500 Received: from mail-ig0-f171.google.com ([209.85.213.171]:41532 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932213AbbBDVb4 (ORCPT ); Wed, 4 Feb 2015 16:31:56 -0500 Received: by mail-ig0-f171.google.com with SMTP id h15so21652560igd.4 for ; Wed, 04 Feb 2015 13:31:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:content-type:mime-version :content-transfer-encoding; bh=hpXYryL+eiP/uxH9Dw3a+1KDAL/gGMQu+IOLZudXhVU=; b=L9El70wLBofcsgTc3kowzpBUmqI5pI8/g5D6yrfnqxZhTK2aYmQIvr73+73IU79VuR MWAItRxi6dVz0D/wi5hY0lAeawvYvgW0X35BZKCd9bac0tyKh5yQoev9fBP/qwWA54VN yD9R5h1P97Ww2qxFOGuxKsY+/8GMoKLBOfiE5LdaCICJSGooHFg5yqO87eZbplkWp3+Z XhtaQYTVmTsMhD7slo8mPhPNLqUdXHfhBdY3qEDiMakLPL/1mzB3rzH10YGlfL1Wshue mUVxI8ymo4FyvoGZj076xxSToqmbzOE1e3OOKp1zOJofHvSsy5UrfuOE8CfxSjdtG7+c nqnA== X-Received: by 10.43.139.13 with SMTP id iu13mr3974386icc.55.1423085515908; Wed, 04 Feb 2015 13:31:55 -0800 (PST) Received: from ?IPv6:2620:0:1000:3e02:d973:2bfe:91c7:b4fe? ([2620:0:1000:3e02:d973:2bfe:91c7:b4fe]) by mx.google.com with ESMTPSA id c4sm1692786igt.19.2015.02.04.13.31.55 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 13:31:55 -0800 (PST) Message-ID: <1423085514.31870.20.camel@edumazet-glaptop2.roam.corp.google.com> Subject: [PATCH net] flow_keys: n_proto type should be __be16 From: Eric Dumazet To: David Miller Cc: netdev , Govindarajulu Varadarajan <_govind@gmx.com> Date: Wed, 04 Feb 2015 13:31:54 -0800 X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Eric Dumazet (struct flow_keys)->n_proto is in network order, use proper type for this. Fixes following sparse errors : net/core/flow_dissector.c:139:39: warning: incorrect type in assignment (different base types) net/core/flow_dissector.c:139:39: expected unsigned short [unsigned] [usertype] n_proto net/core/flow_dissector.c:139:39: got restricted __be16 [assigned] [usertype] proto net/core/flow_dissector.c:237:23: warning: incorrect type in assignment (different base types) net/core/flow_dissector.c:237:23: expected unsigned short [unsigned] [usertype] n_proto net/core/flow_dissector.c:237:23: got restricted __be16 [assigned] [usertype] proto Signed-off-by: Eric Dumazet Fixes: e0f31d849867 ("flow_keys: Record IP layer protocol in skb_flow_dissect()") --- include/net/flow_keys.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h index 7ee2df083542..dc8fd81412bf 100644 --- a/include/net/flow_keys.h +++ b/include/net/flow_keys.h @@ -22,9 +22,9 @@ struct flow_keys { __be32 ports; __be16 port16[2]; }; - u16 thoff; - u16 n_proto; - u8 ip_proto; + u16 thoff; + __be16 n_proto; + u8 ip_proto; }; bool __skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow,