Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp517073pxb; Sat, 21 Aug 2021 09:20:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAm75lR2RE4vuP511b/+dBiQb+pp9erknt75HBIS99drINUu9R1v7nejsMSS72WikSP9+P X-Received: by 2002:a02:5bc5:: with SMTP id g188mr23126784jab.136.1629562826606; Sat, 21 Aug 2021 09:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629562826; cv=none; d=google.com; s=arc-20160816; b=eIpb/ZuJf2Cs9ncZ3/VKk+zJeDMKAYmSUwv/vRuuKF/Ex76WearJGEFySOeap1f3mk GD2qZI0zbTrRBuy2z4rYhpdPfWZt3OqgLmuP01MxTtlcPbW9QVnOS50n+e23ZxRV35xp 7q4p5X7yULMBOlPDe3vRIl21Yt/+EwSW2nGVOeFbmGSVL8K8k2Yo+r5MvsdopPKz7O4X qlkuiwxNbik1aGRaONn+22LDsv0RfmOYz21QIjszWLN1mDdqLimALe+VaToTed7rIZTR h/agWh9QfVsa1crrv/O4Fleq/b8E2rLLLW48j8hoos4TfTqAa5VEkPxqmqYxd/NUO2ib vUsQ== 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=4Zl7hpkQNAzQpl+WueTiiFC/5DwvdT2bmpyqMhyPHeA=; b=IRF/6EQBInFoMgaLqxqDlyGGIuUHIlZaqUCz7sj6fOUAi28W9dIjpmQlTGDdmaud1A Z2yESmdEZlaMd8023p+A3lkywgJMX6aa5IJibacGUwivMuoV/hy0fUEeVsW+GLb5i3If jta52ta/spXnQQQaRl3u0xuwdE8KsozpEbfzdbew/jXgskcgOLBWBDpee+rgRYexDfnO X8iHZvIC+6LWHyn5JpbHqa7KwWcPzQUraTYGnZpMK9L/eb47BylMHivgHzX1CkLfZBie WuX/ipc+GHoqvWlM6g6bXOLQkcDkxiREt/diZva29yxQA9cU3niJEKiTbS3vR9xf4zsU lszg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eIfNK6sy; 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 f11si9719811iok.80.2021.08.21.09.19.59; Sat, 21 Aug 2021 09:20:26 -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=eIfNK6sy; 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 S231564AbhHUQTX (ORCPT + 99 others); Sat, 21 Aug 2021 12:19:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229627AbhHUQTW (ORCPT ); Sat, 21 Aug 2021 12:19:22 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DAFBC061575 for ; Sat, 21 Aug 2021 09:18:43 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id oa17so9278584pjb.1 for ; Sat, 21 Aug 2021 09:18:43 -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=4Zl7hpkQNAzQpl+WueTiiFC/5DwvdT2bmpyqMhyPHeA=; b=eIfNK6synaeafu09TGoYiy0G9RrBfE7AHjR7uG+rIaLDsrnYKv1ev3YpXnJXtwTlF/ D1A8CwV2s6gvycKPTYxxdtO0A4cTlRRTbAMuGUpUZQFh+u2Ic9lQasy5hpEpLebjDTjJ n1HUKEEFp20sdwiF9JUHszLhoqD2vJ2DBQA8xDN73f7jGGhYJYHxi6FvGsbQTJwvSiDg fJ8ZtCiMaqoyXh2LjwWqxkG67SEORl2FIMdProQwqQPju0HpSpWvY9heYyqWEgViN1e1 jJ52S9EytR/pThJj4EJ+2Fy6THURSkeSJrLFitLmIVM45Ig1YsdV8TEwzlj58plaEoCu peWQ== 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=4Zl7hpkQNAzQpl+WueTiiFC/5DwvdT2bmpyqMhyPHeA=; b=aSYDLhzUXd/N8M1jeHBpHstjiDtV1p3EpBFUbTnCtY9KfIz7tdD08+33ADIlSruu7L /jIT7uMs37zJBuv4+YeRLz1LwaP2/HpgLSJuy+dg5ZILIFBxNvmhXIGaMsZJ4C4nMSPZ l6GNhmMvGa/Hj8qQ866sJvGqHVIqb4fxtjpHH7Oy1E+u5l4WZzw21DKjcu6h8ZEKYU0r gAcmUyfnY2AScYslHQsPgNHgRuvhMpLIy/k3efyn3kAYNSbU/KkBZJ65dIYP+bl9nqJq XmJJpMzD05eRYembR1AaRPsYNlbeLHk+J+qlekISRR4qwWzpA0XTKGryeJ4axg5DxyR9 GIKA== X-Gm-Message-State: AOAM5301eBVQwB4eQtquvSrFJQnC3a7c03HyV6sQMr9ilthuo4xo3Lek Rw0dJFngBAYt/yvs7a7NWOs= X-Received: by 2002:a17:90a:c708:: with SMTP id o8mr8419970pjt.16.1629562722713; Sat, 21 Aug 2021 09:18:42 -0700 (PDT) Received: from xps.yggdrasil ([49.207.137.16]) by smtp.gmail.com with ESMTPSA id y27sm4227011pfa.29.2021.08.21.09.18.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Aug 2021 09:18: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 v3 2/5] staging: r8188eu: cast to restricted __be32 Date: Sat, 21 Aug 2021 21:48:29 +0530 Message-Id: <50439a81aca7ce8c3c97ec1c7247f4cd03f645a5.1629562355.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:836:54: warning: cast to restricted __be32 dhpch->cookie is be32, change it's type. Suggested-by: Larry Finger Signed-off-by: Aakash Hemadri --- 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 f6d1f6029ec3..f65d94bfa286 100644 --- a/drivers/staging/r8188eu/core/rtw_br_ext.c +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c @@ -649,7 +649,7 @@ struct dhcpMessage { u_int8_t chaddr[16]; u_int8_t sname[64]; u_int8_t file[128]; - u_int32_t cookie; + __be32 cookie; u_int8_t options[308]; /* 312 - cookie */ }; @@ -671,7 +671,7 @@ void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb) (udph->dest == __constant_htons(SERVER_PORT))) { /* DHCP request */ struct dhcpMessage *dhcph = (struct dhcpMessage *)((size_t)udph + sizeof(struct udphdr)); - u32 cookie = be32_to_cpu((__be32)dhcph->cookie); + u32 cookie = be32_to_cpu(dhcph->cookie); if (cookie == DHCP_MAGIC) { /* match magic word */ if (!(dhcph->flags & htons(BROADCAST_FLAG))) { -- 2.32.0