mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next 07/10] net: hns3: remove unnecessary (void*) conversions
@ 2023-06-28  2:45 wuych
  2023-06-28  7:26 ` Hao Lan
  0 siblings, 1 reply; 3+ messages in thread
From: wuych @ 2023-06-28  2:45 UTC (permalink / raw)
  To: yisen.zhuang, salil.mehta, davem, edumazet, kuba, pabeni
  Cc: netdev, linux-kernel, kernel-janitors, wuych

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;
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next 07/10] net: hns3: remove unnecessary (void*) conversions
  2023-06-28  2:45 [PATCH net-next 07/10] net: hns3: remove unnecessary (void*) conversions wuych
@ 2023-06-28  7:26 ` Hao Lan
  2023-06-28  8:45   ` yunchuan
  0 siblings, 1 reply; 3+ messages in thread
From: Hao Lan @ 2023-06-28  7:26 UTC (permalink / raw)
  To: wuych, yisen.zhuang, salil.mehta, davem, edumazet, kuba, pabeni
  Cc: netdev, linux-kernel, kernel-janitors



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next 07/10] net: hns3: remove unnecessary (void*) conversions
  2023-06-28  7:26 ` Hao Lan
@ 2023-06-28  8:45   ` yunchuan
  0 siblings, 0 replies; 3+ messages in thread
From: yunchuan @ 2023-06-28  8:45 UTC (permalink / raw)
  To: Hao Lan, yisen.zhuang, salil.mehta, davem, edumazet, kuba, pabeni
  Cc: netdev, linux-kernel, kernel-janitors


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-28  8:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28  2:45 [PATCH net-next 07/10] net: hns3: remove unnecessary (void*) conversions wuych
2023-06-28  7:26 ` Hao Lan
2023-06-28  8:45   ` yunchuan

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®