From patchwork Mon Jul 17 03:10:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Yunchuan X-Patchwork-Id: 121007 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp878219vqt; Sun, 16 Jul 2023 20:14:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlETiUeiU3I/0qCdC33dWw7bQgOlbZoGBljN43qTNxwYcHfCxQveKb0Kok/YIsFqswO77gUE X-Received: by 2002:a17:906:5302:b0:992:3b89:f980 with SMTP id h2-20020a170906530200b009923b89f980mr10000736ejo.31.1689563644630; Sun, 16 Jul 2023 20:14:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689563644; cv=none; d=google.com; s=arc-20160816; b=qohELtbWkwvrbeHw9Bk8rzbmUw7MdrW4lLDmGznmml/qsV0xL7r3YxshcgUFVK+xFa XnZnAI8lC+qu3Qi3uMOlfkDTJroW8GmJFfdaNKguum7KRer732DTgVlTSoZ+FIebXmVb DK9naedXHmamjs5l8XhNfQTbO2uiGRJkt1LEXhpF7+QYvZvUnVxjiUvYQ8vrvQnmjN6X ZkZpqc/IO+32QrRgQf1IuB9xstvxCZ0KK6vUn8wuty/shgy3zwd7D/M6q1WPi+IMTCiB DzAVVXILzEaUMTGF2RJJxvs9N/Fow5RPLsSz4pM3MYBnY6n8MWyKAZvED1ZJrFG0zWy0 qUNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ii/7cGtFu6L4D3D9uKohx0lyZJzW9ehzxwgnAz7656Q=; fh=B4yAazw2qNSSvQduq6g0Q15aRNLOBI1LuVGI3NJkBlQ=; b=JE9WiROz+iTbpn3eICzNe+vME29G9yIUpNqObjFA4mryZsWTV3Zndy77Pq7MyRarUK zX71F1MS7NQw80NWJkBRF4lJLUsijEjmOyh7lDIdyztV60akl7SwKbFcpPPXNA50t7hA 0ytx9aY4wQleZtYjOFSMVl8/y/xE4vSfuSGCojkrRne5h6x5PX28Yhzl26woOUPLkGsp z+UuojEAq6n9Rk6SAFq7pxIdZz3H3RX+ibW71zwcElbyLXikp5J4W/X2WHs6eqtUtJ7y 4GnBofq8CyK1CKy+VQJpBZSz6UnqxhrZvfzJ4ss0/AAQmZlqmojVo88zlJqepLxhzE/a oJ5Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id by18-20020a170906a2d200b0098d807c0e8fsi12570257ejb.264.2023.07.16.20.13.40; Sun, 16 Jul 2023 20:14:04 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231196AbjGQDLL (ORCPT + 99 others); Sun, 16 Jul 2023 23:11:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231195AbjGQDLJ (ORCPT ); Sun, 16 Jul 2023 23:11:09 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 326EF10D; Sun, 16 Jul 2023 20:11:04 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 470006012605B; Mon, 17 Jul 2023 11:11:02 +0800 (CST) X-MD-Sfrom: yunchuan@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Wu Yunchuan To: irusskikh@marvell.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: yunchuan@nfschina.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH net-next v3 1/9] net: atlantic: Remove unnecessary (void*) conversions Date: Mon, 17 Jul 2023 11:10:55 +0800 Message-Id: <20230717031055.54266-1-yunchuan@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RDNS_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: INBOX X-GMAIL-THRID: 1771635888465780111 X-GMAIL-MSGID: 1771635888465780111 No need cast (void*) to (struct hw_atl2_priv *). Signed-off-by: Wu Yunchuan --- .../net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c | 12 ++++++------ .../aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c index 5dfc751572ed..220400a633f5 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c @@ -93,7 +93,7 @@ static u32 hw_atl2_sem_act_rslvr_get(struct aq_hw_s *self) static int hw_atl2_hw_reset(struct aq_hw_s *self) { - struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv; + struct hw_atl2_priv *priv = self->priv; int err; err = hw_atl2_utils_soft_reset(self); @@ -378,8 +378,8 @@ static int hw_atl2_hw_init_tx_path(struct aq_hw_s *self) static void hw_atl2_hw_init_new_rx_filters(struct aq_hw_s *self) { - struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv; u8 *prio_tc_map = self->aq_nic_cfg->prio_tc_map; + struct hw_atl2_priv *priv = self->priv; u16 action; u8 index; int i; @@ -433,7 +433,7 @@ static void hw_atl2_hw_new_rx_filter_vlan_promisc(struct aq_hw_s *self, u16 off_action = (!promisc && !hw_atl_rpfl2promiscuous_mode_en_get(self)) ? HW_ATL2_ACTION_DROP : HW_ATL2_ACTION_DISABLE; - struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv; + struct hw_atl2_priv *priv = self->priv; u8 index; index = priv->art_base_index + HW_ATL2_RPF_VLAN_PROMISC_OFF_INDEX; @@ -445,7 +445,7 @@ static void hw_atl2_hw_new_rx_filter_vlan_promisc(struct aq_hw_s *self, static void hw_atl2_hw_new_rx_filter_promisc(struct aq_hw_s *self, bool promisc) { u16 off_action = promisc ? HW_ATL2_ACTION_DISABLE : HW_ATL2_ACTION_DROP; - struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv; + struct hw_atl2_priv *priv = self->priv; bool vlan_promisc_enable; u8 index; @@ -539,8 +539,8 @@ static int hw_atl2_hw_init(struct aq_hw_s *self, const u8 *mac_addr) [AQ_HW_IRQ_MSIX] = { 0x20000022U, 0x20000026U }, }; - struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv; struct aq_nic_cfg_s *aq_nic_cfg = self->aq_nic_cfg; + struct hw_atl2_priv *priv = self->priv; u8 base_index, count; int err; @@ -770,7 +770,7 @@ static struct aq_stats_s *hw_atl2_utils_get_hw_stats(struct aq_hw_s *self) static int hw_atl2_hw_vlan_set(struct aq_hw_s *self, struct aq_rx_filter_vlan *aq_vlans) { - struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv; + struct hw_atl2_priv *priv = self->priv; u32 queue; u8 index; int i; diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c index 674683b54304..52e2070a4a2f 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c @@ -413,8 +413,8 @@ do { \ static int aq_a2_fw_update_stats(struct aq_hw_s *self) { - struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv; struct aq_stats_s *cs = &self->curr_stats; + struct hw_atl2_priv *priv = self->priv; struct statistics_s stats; struct version_s version; int err;