Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2020814pxb; Mon, 23 Aug 2021 10:06:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKLumpLK2CTJPvWLXwUqL8dZZqXaCm58GhE3zIZfcXMdh9m97mhlnMdwOAcf2nJpxAvO1y X-Received: by 2002:a05:6402:2794:: with SMTP id b20mr39610453ede.126.1629738375038; Mon, 23 Aug 2021 10:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629738375; cv=none; d=google.com; s=arc-20160816; b=yxguLnkeUpc9NycYNuw213izv6dSbRinbL0F1+K/XdQl6slRH8aagGfZiIYDaiegHM sZ9KL4vnzKAQj0TnkCbc0g/sMKThuwb7ogSt2pkb6diffO04URekYozQ7fZ+NBunJ+mF RIivSLbcKftaY4jwUomn+R4KBrMiiEtfXGWXWAfS+w1mHjiT/XZAp2saSWZ5pj5Y9LyI ugZ7oDGWEMXLjf2gO5TeKbWweM/d45aEFbzCZZyiR3upqIe1UdG9MqkGHyvui/jmWzD8 1npY2I3A1RiYtS3gKlW/aKwD90R++INkIWa/fU/7QnR/eTLNsMgG+ULmG4IN5xnmE3tJ HiYg== 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=RKZs89fuLtkQSgv1rIGCp+G5BzMsQVDBKa5KYJGPMQo=; b=m5CKdaFpFQMwHJxWfieLIyoOtbg83Sis2qLngqrO0iEWA+8ICyJNJYkJkME8gypXVe EbL8sz3W4LRTps9OmvK9MMmU5oiW/l/xGl5FHrcX+H1kIgzZGypNSTe3CbA4DUwWuHtF wGLLYWaTt3s27Lt16UYslSawLhbWDUg33KWFlBBDmGj1tlMkbInBXAXVZXqhCLhtAx+O SiYrirJkCgmOuyKqK5DDSKBrCyYrDy3SgCnlhCUFw7B2t08zNKas3Xk4rvRM1oWkEjZR tAwhpGMpLFsppF1XpZwe5km7JFw+OzYAcF6HHdo05699JZ22QXLkQxcsT2YFp5xPgQA0 YfiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K9CflRAQ; 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 hz2si3211115ejc.512.2021.08.23.10.05.50; Mon, 23 Aug 2021 10:06:15 -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=K9CflRAQ; 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 S231246AbhHWRBn (ORCPT + 99 others); Mon, 23 Aug 2021 13:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231160AbhHWRBm (ORCPT ); Mon, 23 Aug 2021 13:01:42 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7419BC061575 for ; Mon, 23 Aug 2021 10:00:59 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id h9so38432906ejs.4 for ; Mon, 23 Aug 2021 10:00:59 -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=RKZs89fuLtkQSgv1rIGCp+G5BzMsQVDBKa5KYJGPMQo=; b=K9CflRAQPex0Z7F1fAvEEA2mdF8YNHHmNQQYm29NT45BWXaHVee+6I4k+JHaeFJnCF fOsw2vwSUW6G8KaIRtsNKklVkmnz9yvqAWOcyWK1PC87F72KKwE/8H+Q4f3coCCyNwI1 8jMgukxYManP5YW7qO19MEeVYgsD3WoT/T1SK4q39kH7uck3n8Cpt5yPvM53rl2oz8VV OKbrCFSG92e/16eglZRKzh4/uzkrPdTkRBHGnDJ1iU7PplBuJNwS2fCjxo4TCN2FXBfR T/g6AXZ8xkozSvJStYIMb+OQE81eX/829yYB5kN0J9w1RXWdiF6vhID1Nl5hEejTkVgh lFBg== 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=RKZs89fuLtkQSgv1rIGCp+G5BzMsQVDBKa5KYJGPMQo=; b=B3y/HF7Ld9iErfCVScFBOeQuurdzYwx3fPHjU3s2vH+2CnoZwMdog/raYA0FwnntGM ezro+2zDlV8MJJV3uPw0c3QroPsT6+FVnJm7sIeeGyv+uuL7QahMjkuFy2ioGM91FvMc 6/nDO/k6i7Qmlud8LE1F13Llyu0QilwCbTlQ9gIjmIqpGYiA/MXkuM1EekkwJEiNCWyE K+t1e25GqqjxQ4GpJzCCAMGb4K2ttORuRx1hzuUuGuhSEESp013j+Yd/QmC3mYsbiPbS cNpbPDYz82wOzrs3HRYlqiQdS9SsXP8ZyJ4rbDVexNyL1W3MDSaRQBj9lR9QgKVTY0qB LvQg== X-Gm-Message-State: AOAM533NBA4DCECAlsZXU5scF36MZUqnTl9A5C2S/Qq++sA8aYo5xU7O FndNJQUtwLzaCX6BnfaykjxNE0B0yeQ= X-Received: by 2002:a17:906:5408:: with SMTP id q8mr37220563ejo.54.1629738058019; Mon, 23 Aug 2021 10:00:58 -0700 (PDT) Received: from xps.yggdrasil ([49.207.137.16]) by smtp.gmail.com with ESMTPSA id b18sm1633188ejl.90.2021.08.23.10.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Aug 2021 10:00:57 -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 5/5] staging: r8188eu: incorrect type in assignment Date: Mon, 23 Aug 2021 22:30:30 +0530 Message-Id: <876b83dad76a6f561879da0db1fbb25b251374d4.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:516:57: warning: incorrect type in assignment (different base types) > rtw_br_ext.c:516:57: expected unsigned short > rtw_br_ext.c:516:57: got restricted __be16 [usertype] *pMagic holds __be16 change it's type to __be16 Signed-off-by: Aakash Hemadri --- Incorrectly removed htons() to satisfy sparse warning. Instead make pMagic use the appropriate bid endian type 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 83a4594a4214..14cf13516d34 100644 --- a/drivers/staging/r8188eu/core/rtw_br_ext.c +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c @@ -474,7 +474,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method) /* Handle PPPoE frame */ /*---------------------------------------------------*/ struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN); - unsigned short *pMagic; + __be16 *pMagic; switch (method) { case NAT25_CHECK: @@ -512,7 +512,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method) tag->tag_len = htons(MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN+old_tag_len); /* insert the magic_code+client mac in relay tag */ - pMagic = (unsigned short *)tag->tag_data; + pMagic = (__be16 *)tag->tag_data; *pMagic = htons(MAGIC_CODE); memcpy(tag->tag_data+MAGIC_CODE_LEN, skb->data+ETH_ALEN, ETH_ALEN); -- 2.32.0