Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp753597pxb; Thu, 19 Aug 2021 10:21:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz33NE8i7hjeIDYPS4wfO8uz/BL27Nu1pMPhC1L0pGza2pFZNzRb6qjXQXEQla06v6t/uNP X-Received: by 2002:a05:6402:1694:: with SMTP id a20mr17569254edv.99.1629393684171; Thu, 19 Aug 2021 10:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629393684; cv=none; d=google.com; s=arc-20160816; b=MHgzYxa4n/NryqWv6j+lJVppjw5NtL3EtqnOYV+2/quJ5haWmdOQ8L94UyiYaLTIJR 7waUHf+98sRkooHjCB8XJ8yF98oaQWhAJy19P3hh/7hNVyJFJ0DvBVZL9stElmyLBxYj 8mwBLm2BbJ0UHvD2ReV9jIltpyCJJBo0RgS1TtZ4pveG1qEkOZ33+eqmssIbQ51bw8vx JB0uWWH5UXH8vgSorClIV1uJUlJA/rKP2k0FQacagwhKX4/ng3d7oZHQNUMet/Okdaku 6Uob5V4umz6ti/+PrtrFwUtYFPz5CJUvVnQJ/YdAwTeKdnsb/WG/DEgW35GQgmKyom6k 4+tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pp9KHX+o32upRZT3fOsnXx0XP8kSvHtzNLhiksUJgAc=; b=wB4IB5Cr0UdOck34cx9PNs8fQ64pGT5gIpoSmXuYl6mfc368a1ux53zQYwG/T+NKla U5qnqeRrGTYxHX7vt7Y3itoB8TTyriifB67VlJ+xeDTZCsCRlvNaqbPpZUQhG4eyIpyk nDzvDAqdNCj9DpmI/B/wXLWq2h1/4Irp01vQoRIulllY7kYi6aNmCCA+ib6BNlxy2Ps3 WMirKL3nmkoopczKAETGeOolU7y4voyFw6R4qhmNFzm8AFBnoEMSb+XPQwnFXnfAJ0Ud 9QJrkOXCNB5q6TL1NY67Dj5E2fhCu+wKMFnHAUWl9S09YIzza07sSEbeZkjOKatYBj5e c6sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=o48wtOMm; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l17si3881782edc.364.2021.08.19.10.20.57; Thu, 19 Aug 2021 10:21:24 -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=@linuxfoundation.org header.s=korg header.b=o48wtOMm; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232549AbhHSRUB (ORCPT + 99 others); Thu, 19 Aug 2021 13:20:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:42920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232505AbhHSRT6 (ORCPT ); Thu, 19 Aug 2021 13:19:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4FE6B61075; Thu, 19 Aug 2021 17:19:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1629393562; bh=qoLCUB8hdlY6dt5B1iccs3/ypgnDf4kMfDKvX1WGKjk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o48wtOMmiwdfQGDw0eIPc8nz1CuZw3345c1PYuemNAsOQAbR6uVsKnjm5W0vWJ7Wn lGxz1UXCSMepTiSbP5hajlbxNNcPQTb/8Gfiq98WEkvsl077WLEhfSyfmmyTbTZ2cT zDPOrE64DUn1ejibyaKt8D1X5ajHJ0x4fDIBGppI= Date: Thu, 19 Aug 2021 19:19:17 +0200 From: Greg Kroah-Hartman To: Aakash Hemadri Cc: Larry Finger , Phillip Potter , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/5] staging: r8188eu: cast to restricted __be32 Message-ID: References: <602aefc30b0d979dc6e402d52da2f096ea5c67cf.1629360917.git.aakashhemadri123@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <602aefc30b0d979dc6e402d52da2f096ea5c67cf.1629360917.git.aakashhemadri123@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 19, 2021 at 01:47:54PM +0530, Aakash Hemadri wrote: > Fix sparse warning: > > rtw_br_ext.c:836:54: warning: cast to restricted __be32 > > Unnecessary double cast, remove them. > > Signed-off-by: Aakash Hemadri > --- > 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 404fa8904e47..6a0462ce6230 100644 > --- a/drivers/staging/r8188eu/core/rtw_br_ext.c > +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c > @@ -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 = dhcph->cookie; Wait, what? The cookie was in big endian format, and now you just ignore it? Why is this ok? This breaks the code, have you tested this? thanks, greg k-h