Message ID | 20230628024510.1440567-1-yunchuan@nfschina.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8619350vqr; Tue, 27 Jun 2023 19:55:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4tQjPI8McIuKnZaJcS4WAqLPRq/yiAr4baMOF4DnmuaYbu0eck/4F3ckgjXVm8e3kVX6Do X-Received: by 2002:a05:6a20:430c:b0:10b:e7d2:9066 with SMTP id h12-20020a056a20430c00b0010be7d29066mr42354412pzk.2.1687920933131; Tue, 27 Jun 2023 19:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687920933; cv=none; d=google.com; s=arc-20160816; b=pPYSJSkSUwkaiWCtqwIDaMrmXqL5eI/fNG1XQ6PIjiwI3dCzglD5SF7PBlqXSMNrie ZHCecjdxiuD96Mn3/cxjdATNukh698kpYQKcxiNSGud7YJi15QDAXuR49OM1vMM77dof 9rMVZ4hlxUlzcpeggsa6ZuGsgY5uXimzCBNODOZTLoHd0jBQ56fBQdz7sdZdakFTthpr VgvvJ2GUU+qQ8yckjmc+Ez3PPolZaYO02bO+9jLKRKIaadqLo10DPdEsryn7hXxijgkE g310sRUIaB7DUMiUfl3wdTOqmb6FVaUZnK+lsF5ORO6lVrpLnH1QL2v0UREbbh62nkVz H7mg== 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=i4C+BzRb95sxUeuoYyHCDuffuCltWvXbZxlMpfCmIEY=; fh=X/ZaM99Qs05jXabnms60OxKs1Q7MnQ1iuRfLJ2Tw5gA=; b=cpj9cl9Fsd4ZZHPbvQZAjo4/zdOsAmBTd0ee1ilHALg8QoIWBL9uv/EplSfuTbmS2f 6vFTLWiY1hAm+mXGM6ADHe6AAKlHLtjKMXenVUOTtMCbRpMHm0yeA4Gfly2aSbX3kQoG gEhkrONOzuEi/bidpdXNE+qHtV8W9bZH+H3LEBTmoWYuzvZBoSDSNj2w+K6jxBS6YPT8 KTU6WIhTLhHRG4pLaG5gGVwUsyLOw37NAYUDzEGiddUzvWL1oDIWqQ3pmWUDVXkV4wA0 Bn0wRV5xz1jhZXMQSqPrJiPPteFcyPpDaNO3dSn6nLumUvhsV4VLQQoBaUyA8w0Q5oIn MQWQ== 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 k7-20020a635607000000b0055acfb661casi6042067pgb.894.2023.06.27.19.55.19; Tue, 27 Jun 2023 19:55:33 -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 S231417AbjF1Cpo (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Tue, 27 Jun 2023 22:45:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231416AbjF1CpZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 27 Jun 2023 22:45:25 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id CF20D3A81; Tue, 27 Jun 2023 19:45:14 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 3A90A604D9369; Wed, 28 Jun 2023 10:45:12 +0800 (CST) X-MD-Sfrom: yunchuan@nfschina.com X-MD-SrcIP: 180.167.10.98 From: wuych <yunchuan@nfschina.com> To: yisen.zhuang@huawei.com, salil.mehta@huawei.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, wuych <yunchuan@nfschina.com> Subject: [PATCH net-next 07/10] net: hns3: remove unnecessary (void*) conversions Date: Wed, 28 Jun 2023 10:45:10 +0800 Message-Id: <20230628024510.1440567-1-yunchuan@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769913380328969209?= X-GMAIL-MSGID: =?utf-8?q?1769913380328969209?= |
Series |
Remove unnecessary (void*) conversions
|
|
Commit Message
Wu Yunchuan
June 28, 2023, 2:45 a.m. UTC
Pointer variables of void * type do not require type cast.
Signed-off-by: wuych <yunchuan@nfschina.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 2023/6/28 10:45, wuych wrote: > Pointer variables of void * type do not require type cast. > > Signed-off-by: wuych <yunchuan@nfschina.com> > --- > drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c > index 51d1278b18f6..1df941ef86e3 100644 > --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c > +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c > @@ -570,7 +570,7 @@ static void hns3_get_strings(struct net_device *netdev, u32 stringset, u8 *data) > > static u64 *hns3_get_stats_tqps(struct hnae3_handle *handle, u64 *data) > { > - struct hns3_nic_priv *nic_priv = (struct hns3_nic_priv *)handle->priv; > + struct hns3_nic_priv *nic_priv = handle->priv; > struct hnae3_knic_private_info *kinfo = &handle->kinfo; > struct hns3_enet_ring *ring; > u8 *stat; > Hi wuych, Thank you for your patch. nit: the local variable declarations could be reverse xmas tree longest line to shortest line. One option being: static u64 *hns3_get_stats_tqps(struct hnae3_handle *handle, u64 *data) { - struct hns3_nic_priv *nic_priv = (struct hns3_nic_priv *)handle->priv; struct hnae3_knic_private_info *kinfo = &handle->kinfo; + struct hns3_nic_priv *nic_priv = handle->priv; struct hns3_enet_ring *ring; u8 *stat; and elsewhere in other patchs. By the way, the net-next branch is currently closed, and you need to wait for the merge window to open before merging patches. Reviewed-by: Hao Lan <lanhao@huawei.com> Yours, Hao Lan
On 2023/6/28 15:26, Hao Lan wrote: > nit: the local variable declarations could be reverse xmas tree > longest line to shortest line. > and elsewhere in other patchs. Hi, Hao Lan, I am so sorry for this, I will check again and resend them when the merge window opening. Thanks for your reply! wuych > > By the way, the net-next branch is currently closed, and you need to wait for > the merge window to open before merging patches. > > Reviewed-by: Hao Lan <lanhao@huawei.com> > > Yours, > Hao Lan
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 51d1278b18f6..1df941ef86e3 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -570,7 +570,7 @@ static void hns3_get_strings(struct net_device *netdev, u32 stringset, u8 *data) static u64 *hns3_get_stats_tqps(struct hnae3_handle *handle, u64 *data) { - struct hns3_nic_priv *nic_priv = (struct hns3_nic_priv *)handle->priv; + struct hns3_nic_priv *nic_priv = handle->priv; struct hnae3_knic_private_info *kinfo = &handle->kinfo; struct hns3_enet_ring *ring; u8 *stat;