Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp809587rdb; Thu, 19 Oct 2023 22:54:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFetVuytOX5VFTdKMr0q92oivxCZxHV1irNmbQBeQQW+t6mA3LV5PgNTMGIvu1lNlztMgzR X-Received: by 2002:a17:902:d306:b0:1c6:1206:c5b0 with SMTP id b6-20020a170902d30600b001c61206c5b0mr839436plc.67.1697781275937; Thu, 19 Oct 2023 22:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697781275; cv=none; d=google.com; s=arc-20160816; b=DqbQzuPCTtFV8AN0o6CezF7dkjv3Dt1S2DRR9aPNMgrv9XC0063mQvFqxeG8/813xI uX6CPTzFfrfEAcTJIgeozfByio86qF4VhJm92ppPnNkc0uQ4pgid1QjYUYZdQ1YnafuI jcbb6Uw2i4eenzaQe3Bl01CIgok9xXDBYJXc5AbuK/qIjYo4Asi9yl3ZKHEvrk3YAv1U jvlABop4OMs4PWVWCpyozXhkF+0J3i+1z09i5zquGeAWQlqBkrLlyY28chyJBrXpxCBi vO1VCjqeDYotEwOnYe+ZBKxclAtXDvKDMYqkSFqDJc4+e45KpXUSAt6+R2I2WsKRNHDl GChg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=bntUwbGsEU6MPxaTMjD4NfPVGRPzWRkNryBPzIurVVs=; fh=fgD1sNdZ9EUp1ak1fcfbPiHCWhG3mmwvoooQJfb0qfE=; b=xsQEHwOTrwt25kNd3QruJ8ARghKTdRMuqdHWU0mGnK3QYvLHc64ZVSKdghXp/4Ftza z5D3NS+HtqMKESAmA8J9qguF+sY64wU2Rkjblg8xu7d2B0zMIrnWJVOpaNvuT1Ao/fPZ 2/XH/VhR1mlO6A6sSU7nf9XfcinVJRfW1C1ptg6otcnVN+d6n65xTzAfYQDiGKjYN6fe Xpr5rrhJjtM/IIkkEXV4XYY+Q+btcSgKpEKZFBWp9kq6O7pFlEITIXOQUsY4pT6qvLMt SAVgd55hpZFAzj4qxdqfS2zY1aOI8Bf76eU/hGI2iqY23Lo34Y32wyvU9zGGrG09uVMQ adTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id e17-20020a17090301d100b001c9cd55e303si1111996plh.589.2023.10.19.22.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 22:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 7C60081F3807; Thu, 19 Oct 2023 22:54:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346936AbjJTFyb convert rfc822-to-8bit (ORCPT + 52 others); Fri, 20 Oct 2023 01:54:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235623AbjJTFy3 (ORCPT ); Fri, 20 Oct 2023 01:54:29 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37B8ACA for ; Thu, 19 Oct 2023 22:54:27 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 39K5sGxaD3838771, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.93/5.92) with ESMTPS id 39K5sGxaD3838771 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 20 Oct 2023 13:54:16 +0800 Received: from RTEXMBS03.realtek.com.tw (172.21.6.96) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Fri, 20 Oct 2023 13:54:16 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS03.realtek.com.tw (172.21.6.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Fri, 20 Oct 2023 13:54:15 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7]) by RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7%5]) with mapi id 15.01.2375.007; Fri, 20 Oct 2023 13:54:15 +0800 From: Ping-Ke Shih To: Dmitry Antipov CC: Tom Rix , Kalle Valo , "linux-wireless@vger.kernel.org" Subject: RE: [PATCH] [v2] wifi: rtw89: cleanup firmware elements parsing Thread-Topic: [PATCH] [v2] wifi: rtw89: cleanup firmware elements parsing Thread-Index: AQHaAwuJwJleqZFKiUy1cRrrMiPrQ7BSK6sw Date: Fri, 20 Oct 2023 05:54:15 +0000 Message-ID: <03284f2e74444d5ebf103dfe46bf5657@realtek.com> References: <661e7dffafdb403abc2c4cab23c7d1ed@realtek.com> <20231020040940.33154-1-dmantipov@yandex.ru> In-Reply-To: <20231020040940.33154-1-dmantipov@yandex.ru> Accept-Language: en-US, zh-TW Content-Language: zh-TW x-originating-ip: [172.21.71.113] x-kse-serverinfo: RTEXMBS03.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 19 Oct 2023 22:54:32 -0700 (PDT) > -----Original Message----- > From: Dmitry Antipov > Sent: Friday, October 20, 2023 12:10 PM > To: Ping-Ke Shih > Cc: Tom Rix ; Kalle Valo ; linux-wireless@vger.kernel.org; Dmitry > Antipov > Subject: [PATCH] [v2] wifi: rtw89: cleanup firmware elements parsing > > When compiling with clang-18, I've noticed the following: > > drivers/net/wireless/realtek/rtw89/fw.c:389:28: warning: cast to smaller > integer type 'enum rtw89_fw_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] > 389 | enum rtw89_fw_type type = (enum rtw89_fw_type)data; > | ^~~~~~~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/realtek/rtw89/fw.c:569:13: warning: cast to smaller > integer type 'enum rtw89_rf_path' from 'const void *' [-Wvoid-pointer-to-enum-cast] > 569 | rf_path = (enum rtw89_rf_path)data; > | ^~~~~~~~~~~~~~~~~~~~~~~~ > > So avoid brutal everything-to-const-void-and-back casts, introduce > 'union rtw89_fw_element_arg' to pass parameters to element handler > callbacks, and adjust all of the related bits accordingly. Compile > tested only. > > Signed-off-by: Dmitry Antipov I take this patch locally, and performance looks as regular. Thanks. Acked-and-tested-by: Ping-Ke Shih