Message ID | 20170629143138.gn6gwwoyllsolzcp@ltop.local (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3C884603F2 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 29 Jun 2017 14:32:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FD6528731 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 29 Jun 2017 14:32:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24AFD28746; Thu, 29 Jun 2017 14:32:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D29E028756 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 29 Jun 2017 14:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OZ6e87Y1SZ4xEq63PlEyhl8ETr0GAvdPcD+fAKgHDVk=; b=eHn1EItSiKXT8i M1jwzppdkDYFgYwBaRP/gp4/VC8SbVKTB66Jp/JYwLPk6obD59MiLFZZ8OfbtSD95gnkCO2vzrxrm nIcnlGqIrlu1KiYkn34CutcJGWc/P4u/R5zFqtjqLKeoPLUFYEXNBhIm5Z3i4pNFD8GkdSd4mrONL UrkmiU33TOni7GTAR8MnKVvUM1rigOfVbTqy6RHVvfZhracxp9FAvgrkjM+lyhwC1RvVEyZfrJ5mr 6pZ6L6TxDSw643YufpI1SZeZzcGroVizWhc+rgRl6AHsu2Zrmqx90+kECXi8n69FxDpgBcnPgNVUJ ykLHa+5AlCAVf8hk/SCA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dQaUJ-0002jC-QF; Thu, 29 Jun 2017 14:32:07 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQaUG-0002Ug-JU for linux-arm-kernel@lists.infradead.org; Thu, 29 Jun 2017 14:32:06 +0000 Received: by mail-wm0-x244.google.com with SMTP id j85so2930646wmj.0 for <linux-arm-kernel@lists.infradead.org>; Thu, 29 Jun 2017 07:31:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bmcHUbpB8ctvUStBValRPlzjX6/Mgx9ACKI/xc1NvlE=; b=j/wtBaG7J02yf+NxI9k+xd8Asyg4gzbuSnmQuBG+DlqNRr6uwaZZc4l5922BvH2l83 4CSKL5H1QmYGJbRxvxCO5llzDczdEMoVCx0ZMpnl0U1ZkvqgA0tIMccjJfZYL76WaVP2 2dONoUrPqfTtElA4lR/VabN+lKQfYIuBYi4SvEUeK1w9CtfBgnS56DkSFbloi90/NPwf Nn+gmVJej/DHiHfyzO6bumSCDEVzZCMBs6KxTJOnl/3Rpl5VSXahtf9weUdIjmfhHS6o X01Ff5xjkC30Yk6ittbot6ULoQqw91xp8ZWrpWcrj54dJxC8Hi3ykXAz0mBdSSUSLsXZ O+7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bmcHUbpB8ctvUStBValRPlzjX6/Mgx9ACKI/xc1NvlE=; b=b3QMl1ayR/jA90ANVqHLBKV71QNjIv7MdPeSE5maF//jhF4N9GXJNaAi4KfdYTeorj BlZvstHaoIJHSJQRufEWu5XfxTzwKmQz1KBBJNmjxleTGmT4cQPYWEi0nVKTRo7b3RPG dOeWASW+4PWpL7pBFAAt5StzjnxzKupCfBESorrtjURMm0gnP3kjdWulPFNg4Rv4Y17Y Wtq+P4yX8PVdcaeHygAGhHMuILXozVH1FI+2/RGCbvFv6XkH3DWZI3JG4cD/R9vUs1Z1 PIqfYxuixwpIfLa0cy8n3QqiN64MOJIEd+tl1zOlLBgT8qlLB20GqBewk+HhvHVt4rl3 5I7w== X-Gm-Message-State: AKS2vOxNV46hqOLNh4WI9UnpdI41r3s+QKoP9MGaXotqMHZhESyin93D 2SPS7X+snyh6Vl1dFtc= X-Received: by 10.80.218.135 with SMTP id q7mr1989998edj.85.1498746702906; Thu, 29 Jun 2017 07:31:42 -0700 (PDT) Received: from ltop.local ([2a02:a03f:837:f300:1816:df24:7b15:fb23]) by smtp.gmail.com with ESMTPSA id c36sm684081edb.31.2017.06.29.07.31.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 07:31:42 -0700 (PDT) Date: Thu, 29 Jun 2017 16:31:40 +0200 From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> To: Will Deacon <will.deacon@arm.com> Subject: [PATCH v2] arm64: add missing conversion to __wsum in ip_fast_csum() Message-ID: <20170629143138.gn6gwwoyllsolzcp@ltop.local> References: <20170628145814.24763-1-luc.vanoostenryck@gmail.com> <20170629100743.GD14607@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170629100743.GD14607@arm.com> User-Agent: NeoMutt/20170428 (1.8.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170629_073204_834040_337F0B6E X-CRM114-Status: GOOD ( 11.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Catalin Marinas <catalin.marinas@arm.com>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/arm64/include/asm/checksum.h b/arch/arm64/include/asm/checksum.h index 09f65339d..0b6f5a7d4 100644 --- a/arch/arm64/include/asm/checksum.h +++ b/arch/arm64/include/asm/checksum.h @@ -42,7 +42,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) } while (--ihl); sum += ((sum >> 32) | (sum << 32)); - return csum_fold(sum >> 32); + return csum_fold((__force u32)(sum >> 32)); } #define ip_fast_csum ip_fast_csum
ARM64 implementation of ip_fast_csum() do most of the work in 128 or 64 bit and call csum_fold() to finalize. csum_fold() itself take a __wsum argument, to insure that this value is always a 32bit native-order value. Fix this by adding the sadly needed '__force' to cast the native 'sum' to the type '__wsum'. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- Change since v1: - use the simple __force cast instead of an intermediate helper. --- arch/arm64/include/asm/checksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)