Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp51706imu; Thu, 8 Nov 2018 14:36:51 -0800 (PST) X-Google-Smtp-Source: AJdET5dhWoCMDlMJdYJaidPvmLsG3LKY+1Bd8BiiO9QTydD6tQFD1U3PlCRcTw35VEaS5XKvbp7Z X-Received: by 2002:a65:5a05:: with SMTP id y5-v6mr5277613pgs.161.1541716611215; Thu, 08 Nov 2018 14:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716611; cv=none; d=google.com; s=arc-20160816; b=NnzPsbmtjoRkD/jgFNRcOWQ8779hXAM/ghuu9uE+NfMXhgwMxIZmFace5WPS37d6jc PM2gUAC7vZPj7KOR9yk4a9jjI69+aDN8i8w5Ql3LYf4ZYy/KXhS8BkfBLnbInkJEfzin H2mznYNZitP2NWNiD9h5DhCRSnlWoSqmxenVytpVMXHJ6UdkXxn4LaGEFNEccU58Yz/R 4CY2df+jy6PH9VpJSVBavP0uznj2T8Hr+r8W498pY05sK7TuY//01iBM4T1i+TJqUbHx v4pUnh9n16wI99k4qgAARaxLaC9H1Dgg87oh81HqyW35E7BR9EeLlODTsqdmERnZAkOU iPKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mlXa6xDDF+eZ/d04BXRcYF9AXZhqiEYylKABXfhUUK0=; b=RHQTGpxb5krdu2J5da+2oY7NcCAFLXzrYc7MX4wLzyITkmi/OpQW8fKkVHSKczByng SVWrYIfv9TJ0GYU7bQzLvIcaz6W5J4KjcPYcfcyAYeFIr06EMW7mymjxMRCUPr71YIMJ 5plRYY2dAm1uzjLV5GL3P/zy/osigbtvpqdU1mRmqAJkT3i+tZoDaZn6D3KOwwbn7CuL FEd7HCx84Jb87RKw2CTHvWjTRDRo3DYx8BhqvrgPG9GCcxbn6Stv48Kr/FiLzpy8Odvf CQNd35AvWDuPCG2uXjxdCj+asjNrmt+DTVzpkY7XTWaITUCoIifXoIR9Feg1pNABUlNI rRcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DmByO3iI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6-v6si5346505plt.212.2018.11.08.14.36.35; Thu, 08 Nov 2018 14:36:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DmByO3iI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729899AbeKIIMk (ORCPT + 99 others); Fri, 9 Nov 2018 03:12:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:54928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728803AbeKIHhH (ORCPT ); Fri, 9 Nov 2018 02:37:07 -0500 Received: from localhost (unknown [208.72.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C916420989; Thu, 8 Nov 2018 21:59:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714378; bh=s2wTjwOp4XfL50Watvv+rbBMg0eNPhYIacqVfsR8nKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DmByO3iIbgBHc9l9Oxri3lxoBIvarsdo4H7XM6W3rDG96pHMbmzd7OiUpSoEiRJoe CAnh4P+KI2hOMJb6EGzrn5ev/84PFXV6iMYtYmG7dttgFmLWb6YxhUsW2+mgh0MQxI grOpHfnuTxgZW/OSWdOzbehwxGhLzxVD0n4ce9sk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Johannes Berg , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 020/114] ipv6: suppress sparse warnings in IP6_ECN_set_ce() Date: Thu, 8 Nov 2018 13:50:35 -0800 Message-Id: <20181108215100.973855851@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215059.051093652@linuxfoundation.org> References: <20181108215059.051093652@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit c15c0ab12fd62f2b19181d05c62d24bc9fa55a42 ] Pass the correct type __wsum to csum_sub() and csum_add(). This doesn't really change anything since __wsum really *is* __be32, but removes the address space warnings from sparse. Cc: Eric Dumazet Fixes: 34ae6a1aa054 ("ipv6: update skb->csum when CE mark is propagated") Signed-off-by: Johannes Berg Acked-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- include/net/inet_ecn.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 0dc0a51da38f..dce2d586d9ce 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h @@ -128,7 +128,8 @@ static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph) to = from | htonl(INET_ECN_CE << 20); *(__be32 *)iph = to; if (skb->ip_summed == CHECKSUM_COMPLETE) - skb->csum = csum_add(csum_sub(skb->csum, from), to); + skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from), + (__force __wsum)to); return 1; } -- 2.17.1