diff mbox series

[net-next,v2,06/10] ice: remove unnecessary (void*) conversions

Message ID 20230710064105.173647-1-suhui@nfschina.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series Remove unnecessary (void*) conversions | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1341 this patch: 1341
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 1364 this patch: 1364
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1364 this patch: 1364
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Su Hui July 10, 2023, 6:41 a.m. UTC
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(-)

Comments

Przemek Kitszel July 11, 2023, 8:35 a.m. UTC | #1
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
Wu Yunchuan July 11, 2023, 9:08 a.m. UTC | #2
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
diff mbox series

Patch

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