mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hao Lan <lanhao@huawei.com>
To: wuych <yunchuan@nfschina.com>, <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>
Subject: Re: [PATCH net-next 07/10] net: hns3: remove unnecessary (void*) conversions
Date: Wed, 28 Jun 2023 15:26:04 +0800	[thread overview]
Message-ID: <408a4d7b-5dbf-fa3b-357d-1cd736f92e83@huawei.com> (raw)
In-Reply-To: <20230628024510.1440567-1-yunchuan@nfschina.com>



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

  reply	other threads:[~2023-06-28  8:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28  2:45 wuych
2023-06-28  7:26 ` Hao Lan [this message]
2023-06-28  8:45   ` yunchuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=408a4d7b-5dbf-fa3b-357d-1cd736f92e83@huawei.com \
    --to=lanhao@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    --cc=yunchuan@nfschina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®