From patchwork Sun Jun 12 10:02:46 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: 634174 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 3rSBLD2MQcz9t0T for ; Sun, 12 Jun 2016 20:03:00 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=stressinduktion.org header.i=@stressinduktion.org header.b=fZZT2VMB; dkim=pass (1024-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b=TxUzd8UU; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751381AbcFLKC5 (ORCPT ); Sun, 12 Jun 2016 06:02:57 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:54413 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827AbcFLKC4 (ORCPT ); Sun, 12 Jun 2016 06:02:56 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9B1BF208EF; Sun, 12 Jun 2016 06:02:55 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Sun, 12 Jun 2016 06:02:55 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= stressinduktion.org; h=cc:date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=JFKymxxLwEkPCNgW0/VJ8UN5YKM =; b=fZZT2VMBTrYuwc2qjVekGfJrswd2elAiZMUuh1iNYQNlqGHtnRaG4MSZ2Ru 8l5D/SocEdmPiJ+raJFml3xuo8LJ6CAewMSRAT4lUOuKAlVhjBx5ujqey9kRMdAM 5eMVhdiJyCEfsdqYkbO2yjNQUVtSWPUprl564TnUEbTEgAto= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=JFKymxxLwEkPCNgW0/VJ8UN5YK M=; b=TxUzd8UUth11zErEYxXkKwlUFHHe58z+oO2qQmL13vREZkUbDXQeYJ9ZLo +ce9W+3aJjXPHrTh9ZgJCQvUCdE8W8YOqKOVhXTh7T0mV+v3UblYiKRrPDgFtivN 9WKMWQzwFiu31KOidb4B+mPtai745GVF6DCQCPi5vYrYwXXsk= X-Sasl-enc: s06+xwr1p4PAlihl7QjmFiIYjp7XFshTEk3dym/YpZf7 1465725774 Received: from z.localhost.localdomain (unknown [213.55.184.190]) by mail.messagingengine.com (Postfix) with ESMTPA id E734BCCDA7; Sun, 12 Jun 2016 06:02:53 -0400 (EDT) From: Hannes Frederic Sowa To: netdev@vger.kernel.org Cc: Cong Wang , Tom Herbert Subject: [PATCH net] ipv4: fix checksum annotation in udp4_csum_init Date: Sun, 12 Jun 2016 12:02:46 +0200 Message-Id: <1465725766-14474-1-git-send-email-hannes@stressinduktion.org> X-Mailer: git-send-email 2.5.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Reported-by: Cong Wang Cc: Cong Wang Cc: Tom Herbert Fixes: 4068579e1e098fa ("net: Implmement RFC 6936 (zero RX csums for UDP/IPv6") Signed-off-by: Hannes Frederic Sowa --- net/ipv4/udp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 0ff31d97d48586..ba0d8b8b76900a 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1755,8 +1755,11 @@ static inline int udp4_csum_init(struct sk_buff *skb, struct udphdr *uh, return err; } - return skb_checksum_init_zero_check(skb, proto, uh->check, - inet_compute_pseudo); + /* Note, we are only interested in != 0 or == 0, thus the + * force to int. + */ + return (__force int)skb_checksum_init_zero_check(skb, proto, uh->check, + inet_compute_pseudo); } /*