From patchwork Sat Jun 11 19:15:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Frederic Sowa X-Patchwork-Id: 634102 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 3rRpjk28Xkz9sdm for ; Sun, 12 Jun 2016 05:18:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=stressinduktion.org header.i=@stressinduktion.org header.b=CKP89tjc; dkim=pass (1024-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b=YMcSalwB; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752636AbcFKTSb (ORCPT ); Sat, 11 Jun 2016 15:18:31 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:35612 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823AbcFKTSa (ORCPT ); Sat, 11 Jun 2016 15:18:30 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 9A4FA20437; Sat, 11 Jun 2016 15:18:29 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Sat, 11 Jun 2016 15:18:29 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= stressinduktion.org; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Ip7OK EQXlwZZyo8fji2tfT5nGwk=; b=CKP89tjccDkG1XH7aAjF06TuqcYN4mOXhj+nT l+JHVape9xf0Fix5bWNYgdQYUlbw7nVoJ9zt+9q21m+NPxtMuiIgAIjzS3nrBSGN QoA+ct+zTHsR7/snMeFjW2qkNykS2xf4cmALyDrJFktVwKZeLB/Oq6XJe+vO2EOs UJkYdY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Ip7O KEQXlwZZyo8fji2tfT5nGwk=; b=YMcSalwBs/x0mOD+jOuP6Rwtau/b2SecobNJ LfapSdsgFPCYjPTcEHG/jrZG0q8DpTGXwrJaCbvYXBIy0Kk9p33WsXWirbVdc/xT FTa/ahOyUaarvpK4mS86hVJatxqAxa34PU7ITiBO6CkNQ1BSlOgPkaMGV5gMoLWJ G9cSt6E= X-Sasl-enc: pIKyxySeKIFwAP/nAnFVPyoHcoxxqeuPKOiBDAX6Iqg1 1465672708 Received: from z.localhost.localdomain (unknown [213.55.184.214]) by mail.messagingengine.com (Postfix) with ESMTPA id EFCB3CCDA7; Sat, 11 Jun 2016 15:17:47 -0400 (EDT) From: Hannes Frederic Sowa To: netdev@vger.kernel.org Cc: Tom Herbert Subject: [PATCH net v2] ipv6: fix checksum annotation in udp6_csum_init Date: Sat, 11 Jun 2016 21:15:37 +0200 Message-Id: <1465672537-26131-1-git-send-email-hannes@stressinduktion.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1465671401-6329-1-git-send-email-hannes@stressinduktion.org> References: <1465671401-6329-1-git-send-email-hannes@stressinduktion.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Cc: Tom Herbert Fixes: 4068579e1e098fa ("net: Implmement RFC 6936 (zero RX csums for UDP/IPv6") Signed-off-by: Hannes Frederic Sowa --- net/ipv6/ip6_checksum.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/ipv6/ip6_checksum.c b/net/ipv6/ip6_checksum.c index b2025bf3da4af2..c0cbcb259f5a9a 100644 --- a/net/ipv6/ip6_checksum.c +++ b/net/ipv6/ip6_checksum.c @@ -78,9 +78,12 @@ int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh, int proto) * we accept a checksum of zero here. When we find the socket * for the UDP packet we'll check if that socket allows zero checksum * for IPv6 (set by socket option). + * + * Note, we are only interested in != 0 or == 0, thus the + * force to int. */ - return skb_checksum_init_zero_check(skb, proto, uh->check, - ip6_compute_pseudo); + return (__force int)skb_checksum_init_zero_check(skb, proto, uh->check, + ip6_compute_pseudo); } EXPORT_SYMBOL(udp6_csum_init);