[2/4] crypto/ionic: remove unnecessary deref of function pointer

Message ID 20250311155300.13410-3-stephen@networkplumber.org (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series more unnecessary function pointer |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger March 11, 2025, 3:51 p.m. UTC
The expression *dev->intf->setup_bars and dev->intf->setup_bars
are equivalent.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/crypto/ionic/ionic_crypto.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Boyer, Andrew March 19, 2025, 3:03 p.m. UTC | #1
> On Mar 11, 2025, at 11:51 AM, Stephen Hemminger <stephen@networkplumber.org> wrote:
> 
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> The expression *dev->intf->setup_bars and dev->intf->setup_bars
> are equivalent.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> drivers/crypto/ionic/ionic_crypto.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/ionic/ionic_crypto.h b/drivers/crypto/ionic/ionic_crypto.h
> index db87ea0490..5a03260486 100644
> --- a/drivers/crypto/ionic/ionic_crypto.h
> +++ b/drivers/crypto/ionic/ionic_crypto.h
> @@ -269,7 +269,7 @@ iocpt_setup_bars(struct iocpt_dev *dev)
>        if (dev->intf->setup_bars == NULL)
>                return -EINVAL;
> 
> -       return (*dev->intf->setup_bars)(dev);
> +       return dev->intf->setup_bars(dev);
> }
> 
> /** iocpt_admin_ctx - Admin command context.
> --
> 2.47.2
> 

Thank you!
  

Patch

diff --git a/drivers/crypto/ionic/ionic_crypto.h b/drivers/crypto/ionic/ionic_crypto.h
index db87ea0490..5a03260486 100644
--- a/drivers/crypto/ionic/ionic_crypto.h
+++ b/drivers/crypto/ionic/ionic_crypto.h
@@ -269,7 +269,7 @@  iocpt_setup_bars(struct iocpt_dev *dev)
 	if (dev->intf->setup_bars == NULL)
 		return -EINVAL;
 
-	return (*dev->intf->setup_bars)(dev);
+	return dev->intf->setup_bars(dev);
 }
 
 /** iocpt_admin_ctx - Admin command context.