Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2018033pxb; Mon, 23 Aug 2021 10:02:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNhsIiU6MSmH41ocYOVig+4RunByYLoQz8HD/ysohf03R8v0tgJ49Cz+IVSO1d+ZrdjoEt X-Received: by 2002:adf:fb44:: with SMTP id c4mr14308513wrs.179.1629738160603; Mon, 23 Aug 2021 10:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629738160; cv=none; d=google.com; s=arc-20160816; b=V7sHpGIA91QuyTsd1QlBIa6BGU+Q1zZDHgoQDH3eMCd1ak4EniY6jr+NugE0B9ht+y GTocNWR/9S860A35WD3EDv2dcyoAJI2o5I7Dte5ObCQ2fcdQc93otwt0dOTY2injre8J fVDgKBDLYO5UYkUPY0UJYNfYIhDP4Xb3gdDrNX8qWV+hhsajdBC3rXlPGKgPVcTfUJoz pB4cUS6u5iH0FD64avTmDAvVfUWl0s+nV2Ztqmzz3SnU2MXVkLIhSQH4VRIJyQ6dyCrZ lopasLaJZUrmZXQxAJ2/9DtnO1LNW/gP/gl7RTfVBAC9BztROmRXXWVA6L4FSiIhLac4 ZCNw== 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=Yj1Ue2jMXvR7X0uHJnNJMhKnuo4YtIqgemMSiUhxv3Q=; b=e8maJhDb8lZanc+bUOLNmE+TuD2D7yle8UPEfQB6PiOjmxfQe/P2NaLqASE5iTTOqB ylCJwuu0INRo70QuMbRyLo7PxPpVwwFjmgvi/S4wqhVHy998ZZcXa4NkK44fJ/qmk3qr VIbUkAVP1G3FIatiYoseEJOmCaC3jFGUU4Cbbq9Mhpid6LM17L+N3jXHvTj5wn4a3ea1 Uv0gORGtZ30YAD9DH0AbideWyXV3BMR1v6Na35nP5IsuZNoP1M0BR3CbxZOB7XnI+m8q C1GN81QII4mPpUDrNX8gvpZfaDJWgtN2l/EcbOzi9gFLANWQTAJghNBb2WA1Df3/NiQJ 5xHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vkn4Hafv; 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 cm23si16229603edb.514.2021.08.23.10.02.16; Mon, 23 Aug 2021 10:02:40 -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=Vkn4Hafv; 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 S231136AbhHWRB2 (ORCPT + 99 others); Mon, 23 Aug 2021 13:01:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbhHWRB1 (ORCPT ); Mon, 23 Aug 2021 13:01:27 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9009C061575 for ; Mon, 23 Aug 2021 10:00:44 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id mf2so19888844ejb.9 for ; Mon, 23 Aug 2021 10:00:44 -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=Yj1Ue2jMXvR7X0uHJnNJMhKnuo4YtIqgemMSiUhxv3Q=; b=Vkn4HafvOIp/HWLPzqTFHfRKzeWas98kiWPTw58yRFaP+XCOAN3p4UOYXkjWVAFLQ9 dBH5zySk1ulGI+/CuKPt3rl7PUU8JQ4iJ8o+gWz5GBheqPxWxwSCBaHQUrbQkkPM7J0a m1lssgE+31ZEpGptu+Nh1nbn8axUTstJCl6pIUz5+75o2YYU5EXEt6dgj3qBb50KENAp WBLXua+HFgSG46ObDooRjaeeh4Uu1Kdu2HFVPmZTF6BXqmKUy7UE/RBal5bC9oE9Ghsb RbEyVvB0LiBMk/Kj1AVdqitwBAAuNzgfrfES0+ODGPNviemBKp9rqkNHgkbyTDTsk1N8 8m7g== 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=Yj1Ue2jMXvR7X0uHJnNJMhKnuo4YtIqgemMSiUhxv3Q=; b=bmryB864Fm0gkwyYzBqn4c10k9JBSukX+HH4RkCcRdvVn6LR1DxqPXDxZqSqI77yDC +PR1ySdXCQRqA8NZfVaC2AEgEJFCsOGklYM2By3x5Ep7oXSot7sxnHZSuGMwU7c7omRF EBjyWOEyw3nM2O9cBAo0czGiSzUi1PPtOtJyTZNhE+/YH4WCNuq4i6h2HhH1eDmdDFIr URP8fiOV4IHIY6NrB0kw1ZXg6yfXUjhMZDeziJzmec3l86m+BNfAceNmbys2Mfnd3y70 4l1BiyMUy3bj8qMLCKlPh0W+ecoAGrYFmuz/fLNNd7OlzQUa3+b8+ny+CE7OTa5g7FRr t2Ug== X-Gm-Message-State: AOAM530Wwk2XXgR5KG8udZcUpUQ5ZlZdML2gP4SKL2LFpXsbbQVm1Wmy 7UpkmTPUuREz1xbCKqdXIEw= X-Received: by 2002:a17:906:edc3:: with SMTP id sb3mr37395976ejb.114.1629738043326; Mon, 23 Aug 2021 10:00:43 -0700 (PDT) Received: from xps.yggdrasil ([49.207.137.16]) by smtp.gmail.com with ESMTPSA id b18sm1633188ejl.90.2021.08.23.10.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Aug 2021 10:00:42 -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 1/5] staging: r8188eu: restricted __be16 degrades to int Date: Mon, 23 Aug 2021 22:30:26 +0530 Message-Id: <7572c80d90b499df7e9feb4781c07967fa31bf88.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:73:23: warning: restricted __be16 degrades to integer Here tag->tag_len is be16, use be16_to_cpu() Signed-off-by: Aakash Hemadri --- Prefer using be16_to_cpu() over ntohs() drivers/staging/r8188eu/core/rtw_br_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c index ee52f28a1e56..f6d1f6029ec3 100644 --- a/drivers/staging/r8188eu/core/rtw_br_ext.c +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c @@ -70,7 +70,7 @@ static int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_tag *tag) struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN); int data_len; - data_len = tag->tag_len + TAG_HDR_LEN; + data_len = be16_to_cpu(tag->tag_len) + TAG_HDR_LEN; if (skb_tailroom(skb) < data_len) { _DEBUG_ERR("skb_tailroom() failed in add SID tag!\n"); return -1; -- 2.32.0