Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1391955pxb; Fri, 20 Aug 2021 04:42:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQIXUZ0krwgSdeeNvuhy1OQuZ15pGejOTx300LGd5UTGXpJu0jylTwZh8pDZ9t5kcx+jHS X-Received: by 2002:a05:6e02:1354:: with SMTP id k20mr12905318ilr.133.1629459731223; Fri, 20 Aug 2021 04:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629459731; cv=none; d=google.com; s=arc-20160816; b=fest8Q+ZIzSS5JtjqXCUad+WWYDTYEhkZ4bW0UwcZN84Rx3eeRVZPQ3MpukB+1MvlE DjRSv+RYyWpDMW0xSI8bD0mfGyKXINyrPYbpdOsPrY5lzWy4S0FKT0SdDRhUviDXHJ+e k8e8OsRHgf0H0YMUQQ78v4VhHD1rUOvrVLcx60Zf8dGtScgOWi+gkd9aTYh23WJIHR35 RgfI/9us92Bx4sJkwA85DS9nH9atGYgn2eRsEPgYC+bMQCEemXtDjGXeMeXwf6JwKb1h 7izhMT+dBOkBkaCdC6VQPPXPMqNNIiqyrg0vFRTa+xXriV41vIqQrWBJe0AoD6MVM3UA mS+A== 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=kv+uYOUebeBGrutf+Glgrn6wPl2zWoyRwYDrWhWzND0=; b=s3Aassth1+Q0NJvvhSd7aj0T/t9iYAdWBJhyML9oUYxgNGGT69Seu/4KKdaZZXazvx IG2ToOrXy9Uto0o4rujfV8ItAO50DDYpmnx6N7H/y6zOoYn9Zcz6Ufiz4Ydu3NtjDcek hbw4/OPF7uJfujujaVmh52yW1l7wxfx0SZ410BVa8WgrEJSrgqe52YtKQQlqJn20u3FU 8R+nbCyHM4I+GMI7QkbuxackGpR1ixQUF1B7Xca4VhIEgQgOhtkCR7N+cOpRYaKUd4gh XYKLkoQXogjMdiQxize+9TO1QFwszOnv5wAsOlqXwnsJVzissSa5LBuKFftivUAH/u1x rv5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YvZKK0ho; 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 p23si6246831jal.44.2021.08.20.04.41.58; Fri, 20 Aug 2021 04:42:11 -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=YvZKK0ho; 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 S239812AbhHTLlL (ORCPT + 99 others); Fri, 20 Aug 2021 07:41:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232681AbhHTLlH (ORCPT ); Fri, 20 Aug 2021 07:41:07 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61CE2C061575 for ; Fri, 20 Aug 2021 04:40:29 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id m26so8343811pff.3 for ; Fri, 20 Aug 2021 04:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kv+uYOUebeBGrutf+Glgrn6wPl2zWoyRwYDrWhWzND0=; b=YvZKK0honxkmUypRJxXgIEA3vW9ooEUcvV5EhtLM+oPN6dh4hLxJru933RwDobP92S vOH/E10r276+8cK8Cl5cs6HpoPzc3uZ8G78lgQvwIBWGfAISgmGpDf1p4wns/T7CUlmY TEXxvAjj/6xEGunHqr5+aTvAyLoVCvP6ln2ynREwE+mOnRG6oyvtz1oPMimZvT3kEHX7 hS8ip0DwkZjE5YHSvCt9x2/IipWsWvZ4hOLFhhKfOyxqBaNHgMCIR5KaHqJm6hnKMpLT 7FdJ0Z60BLDIMYkM4dpA4456HjW1x08cz1gs8F3Sb6va4hMVVwa391g0Zdt6mVkfLw25 PTdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kv+uYOUebeBGrutf+Glgrn6wPl2zWoyRwYDrWhWzND0=; b=L2FZVr7l2vpfafD1zdS6qiwf+zfy0/QJQjG61fbO5gG4T5mpTPXuQCcZAgqijpyCzs Z8sfgmcplHTB8DMfvMJ+8k3niV9Uw5ns/kGB5zd+ptd3EpoyqDp5BCSlD5EI5Gf54QJr yLMnnfM/cN1za0ucGSCvX9SYB460Qf3uXD++8tvYVKqakOf5NB0TEw5YwIYgO/jSjdPU 3QPv0FG1Ybws9JXe3ntga40/L72FXC+pblrJov/9rzh6x/yYnAl7Pij1ULK163gMAldx i7VGdZDFscFXoQpK9Uw8Av9uWxSb7DgzJOa54u57VjNJeUFYywwrdF1IrzmAEhQs2DH3 Ri4g== X-Gm-Message-State: AOAM532W//iQDEp33z9cvcUl2JU724qZprjyGkY4318uGCPZtDTCb7rl Ih0UvMHG7Fp4VFjplGFRn9NiieTptqE= X-Received: by 2002:a63:f749:: with SMTP id f9mr18479135pgk.77.1629459628772; Fri, 20 Aug 2021 04:40:28 -0700 (PDT) Received: from localhost ([49.207.137.16]) by smtp.gmail.com with ESMTPSA id c9sm7848008pgq.58.2021.08.20.04.40.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 04:40:28 -0700 (PDT) Date: Fri, 20 Aug 2021 17:10:26 +0530 From: Aakash Hemadri To: Greg Kroah-Hartman 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: <20210820114026.p7yurpf2zzp3tu34@xps.yggdrasil> References: <602aefc30b0d979dc6e402d52da2f096ea5c67cf.1629360917.git.aakashhemadri123@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/08/19 07:19PM, Greg Kroah-Hartman wrote: > 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? Ah, I assumed clearing a sparse warning was enough to make sure my change was correct. My understanding of endianness is incorrect. Will redo this. Thanks, Aakash Hemadri