* [PATCH net-next v2 06/10] ice: remove unnecessary (void*) conversions
@ 2023-07-10 6:41 ` Su Hui
0 siblings, 0 replies; 6+ messages in thread
From: Su Hui @ 2023-07-10 6:41 UTC (permalink / raw)
To: jesse.brandeburg, anthony.l.nguyen, davem, edumazet, kuba, pabeni
Cc: intel-wired-lan, netdev, linux-kernel, kernel-janitors, wuych
From: wuych <yunchuan@nfschina.com>
Pointer variables of void * type do not require type cast.
Signed-off-by: wuych <yunchuan@nfschina.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 93979ab18bc1..52af3bd80868 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -6242,7 +6242,7 @@ static void ice_tx_dim_work(struct work_struct *work)
u16 itr;
dim = container_of(work, struct dim, work);
- rc = (struct ice_ring_container *)dim->priv;
+ rc = dim->priv;
WARN_ON(dim->profile_ix >= ARRAY_SIZE(tx_profile));
@@ -6262,7 +6262,7 @@ static void ice_rx_dim_work(struct work_struct *work)
u16 itr;
dim = container_of(work, struct dim, work);
- rc = (struct ice_ring_container *)dim->priv;
+ rc = dim->priv;
WARN_ON(dim->profile_ix >= ARRAY_SIZE(rx_profile));
--
2.30.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH net-next v2 06/10] ice: remove unnecessary (void*) conversions
@ 2023-07-10 6:41 ` Su Hui
0 siblings, 0 replies; 6+ messages in thread
From: Su Hui @ 2023-07-10 6:41 UTC (permalink / raw)
To: jesse.brandeburg, anthony.l.nguyen, davem, edumazet, kuba, pabeni
Cc: netdev, kernel-janitors, intel-wired-lan, linux-kernel, wuych
From: wuych <yunchuan@nfschina.com>
Pointer variables of void * type do not require type cast.
Signed-off-by: wuych <yunchuan@nfschina.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 93979ab18bc1..52af3bd80868 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -6242,7 +6242,7 @@ static void ice_tx_dim_work(struct work_struct *work)
u16 itr;
dim = container_of(work, struct dim, work);
- rc = (struct ice_ring_container *)dim->priv;
+ rc = dim->priv;
WARN_ON(dim->profile_ix >= ARRAY_SIZE(tx_profile));
@@ -6262,7 +6262,7 @@ static void ice_rx_dim_work(struct work_struct *work)
u16 itr;
dim = container_of(work, struct dim, work);
- rc = (struct ice_ring_container *)dim->priv;
+ rc = dim->priv;
WARN_ON(dim->profile_ix >= ARRAY_SIZE(rx_profile));
--
2.30.2
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-next v2 06/10] ice: remove unnecessary (void*) conversions
2023-07-10 6:41 ` [Intel-wired-lan] " Su Hui
@ 2023-07-11 8:35 ` Przemek Kitszel
-1 siblings, 0 replies; 6+ messages in thread
From: Przemek Kitszel @ 2023-07-11 8:35 UTC (permalink / raw)
To: Su Hui, jesse.brandeburg, anthony.l.nguyen, davem, edumazet,
kuba, pabeni
Cc: netdev, kernel-janitors, intel-wired-lan, linux-kernel, wuych
On 7/10/23 08:41, Su Hui wrote:
> From: wuych <yunchuan@nfschina.com>
>
> Pointer variables of void * type do not require type cast.
You should rather tell what are you doing here, perhaps:
Drop casts on dim->priv access, which is "void *".
>
> Signed-off-by: wuych <yunchuan@nfschina.com>
You have to provide your own Sign-off when sending patches of other devs.
Also, preferable format is "Name Surname <email>", not a nickname/corpo-id.
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 93979ab18bc1..52af3bd80868 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -6242,7 +6242,7 @@ static void ice_tx_dim_work(struct work_struct *work)
> u16 itr;
>
> dim = container_of(work, struct dim, work);
> - rc = (struct ice_ring_container *)dim->priv;
> + rc = dim->priv;
>
> WARN_ON(dim->profile_ix >= ARRAY_SIZE(tx_profile));
>
> @@ -6262,7 +6262,7 @@ static void ice_rx_dim_work(struct work_struct *work)
> u16 itr;
>
> dim = container_of(work, struct dim, work);
> - rc = (struct ice_ring_container *)dim->priv;
> + rc = dim->priv;
>
> WARN_ON(dim->profile_ix >= ARRAY_SIZE(rx_profile));
>
Code per-se looks ok
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-next v2 06/10] ice: remove unnecessary (void*) conversions
@ 2023-07-11 8:35 ` Przemek Kitszel
0 siblings, 0 replies; 6+ messages in thread
From: Przemek Kitszel @ 2023-07-11 8:35 UTC (permalink / raw)
To: Su Hui, jesse.brandeburg, anthony.l.nguyen, davem, edumazet,
kuba, pabeni
Cc: netdev, intel-wired-lan, kernel-janitors, linux-kernel, wuych
On 7/10/23 08:41, Su Hui wrote:
> From: wuych <yunchuan@nfschina.com>
>
> Pointer variables of void * type do not require type cast.
You should rather tell what are you doing here, perhaps:
Drop casts on dim->priv access, which is "void *".
>
> Signed-off-by: wuych <yunchuan@nfschina.com>
You have to provide your own Sign-off when sending patches of other devs.
Also, preferable format is "Name Surname <email>", not a nickname/corpo-id.
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 93979ab18bc1..52af3bd80868 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -6242,7 +6242,7 @@ static void ice_tx_dim_work(struct work_struct *work)
> u16 itr;
>
> dim = container_of(work, struct dim, work);
> - rc = (struct ice_ring_container *)dim->priv;
> + rc = dim->priv;
>
> WARN_ON(dim->profile_ix >= ARRAY_SIZE(tx_profile));
>
> @@ -6262,7 +6262,7 @@ static void ice_rx_dim_work(struct work_struct *work)
> u16 itr;
>
> dim = container_of(work, struct dim, work);
> - rc = (struct ice_ring_container *)dim->priv;
> + rc = dim->priv;
>
> WARN_ON(dim->profile_ix >= ARRAY_SIZE(rx_profile));
>
Code per-se looks ok
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-next v2 06/10] ice: remove unnecessary (void*) conversions
2023-07-11 8:35 ` Przemek Kitszel
@ 2023-07-11 9:08 ` yunchuan
-1 siblings, 0 replies; 6+ messages in thread
From: yunchuan @ 2023-07-11 9:08 UTC (permalink / raw)
To: Przemek Kitszel, jesse.brandeburg, anthony.l.nguyen, davem,
edumazet, kuba, pabeni
Cc: netdev, intel-wired-lan
On 2023/7/11 16:35, Przemek Kitszel wrote:
> On 7/10/23 08:41, Su Hui wrote:
>> From: wuych <yunchuan@nfschina.com>
>>
>> Pointer variables of void * type do not require type cast.
>
> You should rather tell what are you doing here, perhaps:
> Drop casts on dim->priv access, which is "void *".
>
Thanks for you advice!
Should I resend this patch to modify this?
>>
>> Signed-off-by: wuych <yunchuan@nfschina.com>
>
> You have to provide your own Sign-off when sending patches of other devs.
>
> Also, preferable format is "Name Surname <email>", not a
> nickname/corpo-id.
>
So sorry for this , I have already changed this to my full name "Wu
Yunchuan".
Wu Yunchuan
>> ---
>> drivers/net/ethernet/intel/ice/ice_main.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c
>> b/drivers/net/ethernet/intel/ice/ice_main.c
>> index 93979ab18bc1..52af3bd80868 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_main.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
>> @@ -6242,7 +6242,7 @@ static void ice_tx_dim_work(struct work_struct
>> *work)
>> u16 itr;
>> dim = container_of(work, struct dim, work);
>> - rc = (struct ice_ring_container *)dim->priv;
>> + rc = dim->priv;
>> WARN_ON(dim->profile_ix >= ARRAY_SIZE(tx_profile));
>> @@ -6262,7 +6262,7 @@ static void ice_rx_dim_work(struct
>> work_struct *work)
>> u16 itr;
>> dim = container_of(work, struct dim, work);
>> - rc = (struct ice_ring_container *)dim->priv;
>> + rc = dim->priv;
>> WARN_ON(dim->profile_ix >= ARRAY_SIZE(rx_profile));
>
> Code per-se looks ok
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-next v2 06/10] ice: remove unnecessary (void*) conversions
@ 2023-07-11 9:08 ` yunchuan
0 siblings, 0 replies; 6+ messages in thread
From: yunchuan @ 2023-07-11 9:08 UTC (permalink / raw)
To: Przemek Kitszel, jesse.brandeburg, anthony.l.nguyen, davem,
edumazet, kuba, pabeni
Cc: netdev, intel-wired-lan
On 2023/7/11 16:35, Przemek Kitszel wrote:
> On 7/10/23 08:41, Su Hui wrote:
>> From: wuych <yunchuan@nfschina.com>
>>
>> Pointer variables of void * type do not require type cast.
>
> You should rather tell what are you doing here, perhaps:
> Drop casts on dim->priv access, which is "void *".
>
Thanks for you advice!
Should I resend this patch to modify this?
>>
>> Signed-off-by: wuych <yunchuan@nfschina.com>
>
> You have to provide your own Sign-off when sending patches of other devs.
>
> Also, preferable format is "Name Surname <email>", not a
> nickname/corpo-id.
>
So sorry for this , I have already changed this to my full name "Wu
Yunchuan".
Wu Yunchuan
>> ---
>> drivers/net/ethernet/intel/ice/ice_main.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c
>> b/drivers/net/ethernet/intel/ice/ice_main.c
>> index 93979ab18bc1..52af3bd80868 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_main.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
>> @@ -6242,7 +6242,7 @@ static void ice_tx_dim_work(struct work_struct
>> *work)
>> u16 itr;
>> dim = container_of(work, struct dim, work);
>> - rc = (struct ice_ring_container *)dim->priv;
>> + rc = dim->priv;
>> WARN_ON(dim->profile_ix >= ARRAY_SIZE(tx_profile));
>> @@ -6262,7 +6262,7 @@ static void ice_rx_dim_work(struct
>> work_struct *work)
>> u16 itr;
>> dim = container_of(work, struct dim, work);
>> - rc = (struct ice_ring_container *)dim->priv;
>> + rc = dim->priv;
>> WARN_ON(dim->profile_ix >= ARRAY_SIZE(rx_profile));
>
> Code per-se looks ok
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-07-11 15:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 6:41 [PATCH net-next v2 06/10] ice: remove unnecessary (void*) conversions Su Hui
2023-07-10 6:41 ` [Intel-wired-lan] " Su Hui
2023-07-11 8:35 ` Przemek Kitszel
2023-07-11 8:35 ` Przemek Kitszel
2023-07-11 9:08 ` yunchuan
2023-07-11 9:08 ` yunchuan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.