Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2020282pxb; Mon, 23 Aug 2021 10:05:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIdrMI3bTIdDmn2hNxC/sxNB3xRPU7jxEmwZgkGa4Se6b30XzRVfqmhX51kM30kFf6mFtN X-Received: by 2002:adf:e745:: with SMTP id c5mr1796625wrn.321.1629738332143; Mon, 23 Aug 2021 10:05:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629738332; cv=none; d=google.com; s=arc-20160816; b=Ar7NZHi9g5e9lGXmsmysI2cGN5/xmEOLwbli6S2XYoasXHeo3WD++x+nTmecxEE04/ Hsn8Z9oIDdiHMidFV/LUVidxSK5BW1Usiqr/NBf9PCoE7NUSJX2YqvANZxTqyviO4p9i CXsxCJODuOlm/qPeI1mCYWLkAaLEQWfLdnHpk31bouBrKxgsLVgrMwpE8VRiqM9VPFUH zb31gqUw1V8mp7JI/vx1IZwhjN1C0zE5lKOocdK9uoiEv8iN2Uud0eeFAZpZqoFYqAQt lcrIPcE9lQpC+Hwo99Hb4nN03Fer2EDykXOWeZ1xLO4y6ssGVIV6W1OmEgRdmDqXSrW+ xtCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QrJVb4x0MevIwrPVSWjR2+axB3N0g9Y5As2MZj3In2U=; b=oRXN1bFXboFXEPHEyeTM4eHCTQmGRKON34Yy9PWEpmQDMCiZyk+K7m6J1Kjrbibg05 qFY/anjmghgEheFvygIyv0J79kLam76O92tL8ZE2B/WEuXK8Z+SBQ9wVJk0A+2eaemov GeGSPNI7RX9jcQkoHNvmu8sWiJnWSghE9f/2nxo3akXEjvpqI/tMWHMcblSej14Qt1R5 rvz42C2lGCFNWWstrjZS58i3qk0dAr5i42rcy7LKB8zY5clrDOO6XoN5uOsrITLaTZST 8hudc9gesTb/gV9fxTXDKx3uCyeHiPkSYPuU0h0a+393/Uqv1WzJYfuAdoyInciQtLiF Z1EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bLjKa366; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si15171338ejh.298.2021.08.23.10.05.06; Mon, 23 Aug 2021 10:05:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bLjKa366; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231217AbhHWRBf (ORCPT + 99 others); Mon, 23 Aug 2021 13:01:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231176AbhHWRBf (ORCPT ); Mon, 23 Aug 2021 13:01:35 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12D9DC061575 for ; Mon, 23 Aug 2021 10:00:52 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id n27so6446452eja.5 for ; Mon, 23 Aug 2021 10:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QrJVb4x0MevIwrPVSWjR2+axB3N0g9Y5As2MZj3In2U=; b=bLjKa366IbRr69mpk1Y9xDwMD39ih0ee1UL1bI8hPit/dzHjAnf0KdaawQ//sGaiQP FVKqWnRVJfkPFms88dH22csvFRBXRZkVnNFhCrNPzpP19NyeqRuMcUT5wye1V/ujMaPs XXSYJoksHO35BGd2WqCm6c3u1XTpQUn0p+Lk3Grxy2ZoZaE/WaKflMWrvcYN/JY3MktS VfBTrSHLdQXrgICkWd5am4IltxzzuolU5pdGxMOHQ9u5vk78+fFebRTAHSmf6rEqr1b0 KoZkBxWNjAp0WCOXHWmaRKMzEBiVKwEKVZIDHiwc9ZztrAWQ9hRI9wqxdAbIstM2FRLg b8mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QrJVb4x0MevIwrPVSWjR2+axB3N0g9Y5As2MZj3In2U=; b=tQ04l8VGw62IgEFYtV5XTrdSaFneNrSbl35d0FccQyT1HvY64zJ2I88XMO1wnJpYRx 7+CdZGYo02lY1zuPPxZto22SLekw0FUxTpkQkIaiXIpKScaHM31vwrgmQN9CfJSJCOjv 7tdc+TgXzHNm4wHvEzx5FL9Vb1IV8m9aqHtPld8v/R/5tUEnkYMm3MbhzuJD8imwO67G luE2vezmolvm2QrGcNk5QmZjPac4w2UbvmedhyLQhQbAkkG2uUKBsoA8nr5Fn+pVJabL bSGgBO6olKN+8TbAvRGNnIkUhoqAFRdzAInLX+pZFvTIIQpqDdjtuQ3Go+h/FpQNZor1 +0xQ== X-Gm-Message-State: AOAM533skF7IQLXBjRAcet9je3YRZDkSUW97Yh1nB7JMCvKLJU81Qc+k 3WfXCmZy4sAITcUJS/NB6sGSuHLyA1M= X-Received: by 2002:a17:906:93ef:: with SMTP id yl15mr16441921ejb.229.1629738050629; Mon, 23 Aug 2021 10:00:50 -0700 (PDT) Received: from xps.yggdrasil ([49.207.137.16]) by smtp.gmail.com with ESMTPSA id b18sm1633188ejl.90.2021.08.23.10.00.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Aug 2021 10:00:50 -0700 (PDT) From: Aakash Hemadri To: Greg Kroah-Hartman , Larry Finger , Phillip Potter Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v4 3/5] staging: r8188eu: incorrect type in csum_ipv6_magic Date: Mon, 23 Aug 2021 22:30:28 +0530 Message-Id: <392082864befe91bb03d16ff7ca5e57ba2a8e549.1629563318.git.aakashhemadri123@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix sparse warning: > rtw_br_ext.c:771:84: got restricted __be16 [usertype] payload_len > rtw_br_ext.c:773:110: warning: incorrect type in argument 2 (different base types) > rtw_br_ext.c:773:110: expected int len > rtw_br_ext.c:773:110: got restricted __be16 [usertype] payload_len csum_ipv6_magic and csum_partial expect int len not __be16, use be16_to_cpu() Signed-off-by: Aakash Hemadri --- No changes drivers/staging/r8188eu/core/rtw_br_ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c index f65d94bfa286..26606093a3c3 100644 --- a/drivers/staging/r8188eu/core/rtw_br_ext.c +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c @@ -615,9 +615,9 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method) struct icmp6hdr *hdr = (struct icmp6hdr *)(skb->data + ETH_HLEN + sizeof(*iph)); hdr->icmp6_cksum = 0; hdr->icmp6_cksum = csum_ipv6_magic(&iph->saddr, &iph->daddr, - iph->payload_len, + be16_to_cpu(iph->payload_len), IPPROTO_ICMPV6, - csum_partial((__u8 *)hdr, iph->payload_len, 0)); + csum_partial((__u8 *)hdr, be16_to_cpu(iph->payload_len), 0)); } } } -- 2.32.0