From patchwork Sun Nov 6 17:57:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 16167 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1614802wru; Sun, 6 Nov 2022 10:12:26 -0800 (PST) X-Google-Smtp-Source: AMsMyM6lG1C7X66u0+Gg1cznJa0+8A0wMq36RBE53wNp9+kasnjPV25LavfEdvi7g2Uk+AjaoFXC X-Received: by 2002:a17:907:60d4:b0:79e:8082:132d with SMTP id hv20-20020a17090760d400b0079e8082132dmr45107443ejc.9.1667758345852; Sun, 06 Nov 2022 10:12:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667758345; cv=none; d=google.com; s=arc-20160816; b=zng/X2toeLUnV4Ka8kxoDjxYXMm6u0o447jddI41QTgCFynkI2FuDxcjQaW+7knUeB xUZQqa78TTrviFxQSgdyD6kwyw2LuVWGyrrHvQ3JIpPSj1qHLROUFCinMe2Qy+N/rFmP smL02CeP57Ot9XagQv2PgtuHNv7KF0xYg+kO0wVvhzmDucB/a7Ml5/NYmChx/tw7SVq/ bGD22pQCPLk5upOhVF9efNvu09m678LLwudqhH1y84jNgiwbhTCsw7p34Whj1sR5V8xd wK6LlHl5x2Z01SWl07rlNkEFGpUX4IXiAV4jf8xDrpc3xVtPW3dj7tr9DQxLckHgOFg7 w8qw== 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:to:from:date:dkim-signature; bh=Pt0Pmiv6UrToGYx91FvKZtfACFPnq1d8+5X3k5nLkfY=; b=acMTc0wQMVl7copox5Uga0uvksH+fTKds7F28LtMgfm1ZjVv4sBLF1ZCnUSCGCa35y JpAXraet4ksx6JRUmPBKwt+hNxp4/lre3psWyp3b3MKovTrmxBo9K3qLTZeEFjYrOpom GXbUXsnHfddnwUVMzGVdODq5/ajQcn2wR2zQO0bAntvqSassCg9HawajjTrKViv/eQTf rr9z6wDfanROJEogPb4Qiez/ZZ+Z4PjFZHh3sfe+kr664KogB11PTlj2y0sJUaLif887 L8gMjSfXfWnp73/vTW966U4a+LWAddE1AVFoaqHKrs1wAD3fyNMKWh9eIbkrPGl46cyX t1aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=OL7ufRjr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6-20020a170906bc4600b0078de44dd61fsi5134004ejv.990.2022.11.06.10.12.00; Sun, 06 Nov 2022 10:12:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=OL7ufRjr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230487AbiKFR5b (ORCPT + 99 others); Sun, 6 Nov 2022 12:57:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbiKFR53 (ORCPT ); Sun, 6 Nov 2022 12:57:29 -0500 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9503CA47B for ; Sun, 6 Nov 2022 09:57:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1667757437; bh=R2B3fDOf8MX2Y8ck45wyaW6ET1XIPeT3gTlhsiet+a0=; h=X-EA-Auth:Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=OL7ufRjrqdeP0G1yvdffp4NMSdM3GSaBaZRgp/o00sW0AO/j+DRvRZ6wvdT0bocUQ oIJNDJgOMwX8l4SVpMiIRVE2nSSxtCuNOVtywVwL08c3enooTUYD6fS8auB2BeZ5JR qvu87pjIHTUI60Ku+CcAxNV+2tFkW0auTo7W15uE= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sun, 6 Nov 2022 18:57:17 +0100 (CET) X-EA-Auth: H+PFsFexCiXLjRkugddMC6Rj+rM8J/vUcqx6NmA7KTpCi4zjSKKgYqed5BGoIC0zRxd70x6CFipLp5SQm7lSvF7LPucpg5Ke Date: Sun, 6 Nov 2022 23:27:12 +0530 From: Deepak R Varma To: Larry Finger , Phillip Potter , Pavel Skripkin , Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] staging: r8188eu: remove unnecessary casting Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748771375228934201?= X-GMAIL-MSGID: =?utf-8?q?1748771375228934201?= The dhcpMessage struct member variable "cookie" is already declared to be of type __be32. There is no need to cast it again as __be32. Signed-off-by: Deepak R Varma --- Changes in v2: 1. Change associated with variable cookie separated into this patch. Feedback from gregkh@linuxfoundation.org. drivers/staging/r8188eu/core/rtw_br_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c index 4deaa7e352a3..a7c67014dde0 100644 --- a/drivers/staging/r8188eu/core/rtw_br_ext.c +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c @@ -615,7 +615,7 @@ void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb) if ((udph->source == htons(CLIENT_PORT)) && (udph->dest == htons(SERVER_PORT))) { /* DHCP request */ struct dhcpMessage *dhcph = (void *)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))) {