Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp754611pxb; Thu, 19 Aug 2021 10:22:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwccAa/IxuHeWYKppKH7WI+/zA8yGvNT8l3RF6MJLzXIuFaewN3qRgiMYRqtWxjDJYYwlux X-Received: by 2002:a05:6402:358d:: with SMTP id y13mr17629092edc.300.1629393771039; Thu, 19 Aug 2021 10:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629393771; cv=none; d=google.com; s=arc-20160816; b=toc0WbckiqWmT+xWEqlaAYVGDysDkrJzeub4Ttgt5gmm9NCMAdHWOQ1+dqYS+0h6Aa sRi70kDqcWdVPbEdzlmQVYgORJ3F1Opdwq6TwLt0amIoU3gR8Dzw32XQzO0+LA1kRMzp egLIHW9B2LkVE0GQZ5gs22YQ0stjAUbTzdkq3aqX7IlLB8eA2OfFZGxEqZecM3lna3Ms w1EYFdlb3QfBrjCsY0XgJUi/nnOUylSRmAOuubJNbf70BKFIhFYxrIrhIIxrmELz095s fS4cwxnII/CvSEQWhpqNueMl02BDy8FHTemB6Y1rX4Hz5MSbZAZM9jCAvFALAhFhNdvV esSA== 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=8PyYB2sTMmq7DaOGe2RXdYuBIAVJHB0d5M3mzdBNDz4=; b=Lc8/pFNd+EEmWgHePjiemvM2vsVXhmPOpThduYcM4cdBkZHnI5aZSvPinui8N5KhCU Ldax7NErCB2QqvmYvAwmyMYS5Aj30s3blXUuNLFokxfXZJdo4pVPXtWtikxZ40v+2oId Ama2rNECMI1utDv0+MSEmA4GP3pPBWrXdAFFOTP1gkDnXm2El3tLbXFo3x92K+A5Rp8Q /8D9pedrd+fnJVn/Hf8nHHdkKKAnYblOWd85Y9UMn6eueeoHiYf0ZLYxK0AJCTZrLwM8 2aDLr4W2i3yfc8eMIJTIaeJyjLW9qAU2E+t+mOXuT4urUMcI4TqsWmAWbEA0Ie8xyOof F1/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gBsMQvvk; 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 nc1si4154426ejc.377.2021.08.19.10.22.20; Thu, 19 Aug 2021 10:22:51 -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=gBsMQvvk; 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 S230058AbhHSRVZ (ORCPT + 99 others); Thu, 19 Aug 2021 13:21:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:43186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229465AbhHSRVY (ORCPT ); Thu, 19 Aug 2021 13:21:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 84DED61028; Thu, 19 Aug 2021 17:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1629393648; bh=YzY24lQYMbKKLQwXLzaMuzKanF4AoGWlTRj+qxi045g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gBsMQvvkdugXnBKZSFFFq76XTlNfUJGGDEkWRjIb3walnRzi5sG4gglFT7vjgg3L1 6/w9jVyD7+7uL91l0jmJ9UUGyFeSiSdHal2o+bpag5i8cP88fV06PxKooseZ5s93xF T+Qq8L8XQo/BuFC6Fd1aN4beA1XpYwNnlhIncpyQ= Date: Thu, 19 Aug 2021 19:20:44 +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 4/5] staging: r8188eu: restricted __be16 degrades to int Message-ID: References: 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 Thu, Aug 19, 2021 at 01:47:56PM +0530, Aakash Hemadri wrote: > Fix sparse warning: > > rtw_br_ext.c:839:70: warning: restricted __be16 degrades to integer > > rtw_br_ext.c:845:70: warning: invalid assignment: |= > > rtw_br_ext.c:845:70: left side has type unsigned short > > rtw_br_ext.c:845:70: right side has type restricted __be16 > > dhcp->flag is u16, remove htons() as __be16 degrades. Um, are you sure? > > 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 d4acf02ca64f..14b2935cab98 100644 > --- a/drivers/staging/r8188eu/core/rtw_br_ext.c > +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c > @@ -674,13 +674,13 @@ void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb) > u32 cookie = dhcph->cookie; > > if (cookie == DHCP_MAGIC) { /* match magic word */ > - if (!(dhcph->flags & htons(BROADCAST_FLAG))) { > + if (!(dhcph->flags & BROADCAST_FLAG)) { So you now just ignore the fact that the code used to properly check BROADCAST_FLAG being in big endian mode, and now you assume it is native endian? Why is this ok? Did you test this? thanks, greg k-h