DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xu, Rosen" <rosen.xu@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH 1/4] raw/ifpga: remove unnecessary deref of function pointers
Date: Wed, 12 Mar 2025 14:06:42 +0000	[thread overview]
Message-ID: <DM4PR11MB7757953C09CF5CC65B0ABFCF89D02@DM4PR11MB7757.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20250311155300.13410-2-stephen@networkplumber.org>

Hi,

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Tuesday, March 11, 2025 11:51 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Xu, Rosen
> <rosen.xu@intel.com>
> Subject: [PATCH 1/4] raw/ifpga: remove unnecessary deref of function
> pointers
> 
> The expression *dev->ops->start and dev->ops->start are equivalent.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  drivers/raw/ifpga/afu_pmd_core.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/raw/ifpga/afu_pmd_core.c
> b/drivers/raw/ifpga/afu_pmd_core.c
> index 3ab1f47ac1..f650b76cfe 100644
> --- a/drivers/raw/ifpga/afu_pmd_core.c
> +++ b/drivers/raw/ifpga/afu_pmd_core.c
> @@ -39,7 +39,7 @@ static int afu_rawdev_configure(const struct
> rte_rawdev *rawdev,
>  		return -ENODEV;
> 
>  	if (dev->ops && dev->ops->config)
> -		ret = (*dev->ops->config)(dev, config, config_size);
> +		ret = dev->ops->config(dev, config, config_size);
> 
>  	return ret;
>  }
> @@ -62,7 +62,7 @@ static int afu_rawdev_start(struct rte_rawdev *rawdev)
>  	}
> 
>  	if (dev->ops && dev->ops->start)
> -		ret = (*dev->ops->start)(dev);
> +		ret = dev->ops->start(dev);
> 
>  	afu_rawdev_unlock(dev);
> 
> @@ -87,7 +87,7 @@ static void afu_rawdev_stop(struct rte_rawdev
> *rawdev)
>  	}
> 
>  	if (dev->ops && dev->ops->stop)
> -		ret = (*dev->ops->stop)(dev);
> +		ret = dev->ops->stop(dev);
> 
>  	afu_rawdev_unlock(dev);
>  }
> @@ -104,7 +104,7 @@ static int afu_rawdev_close(struct rte_rawdev
> *rawdev)
>  		return -ENODEV;
> 
>  	if (dev->ops && dev->ops->close)
> -		ret = (*dev->ops->close)(dev);
> +		ret = dev->ops->close(dev);
> 
>  	return ret;
>  }
> @@ -127,7 +127,7 @@ static int afu_rawdev_reset(struct rte_rawdev
> *rawdev)
>  	}
> 
>  	if (dev->ops && dev->ops->reset)
> -		ret = (*dev->ops->reset)(dev);
> +		ret = dev->ops->reset(dev);
> 
>  	afu_rawdev_unlock(dev);
> 
> @@ -155,7 +155,7 @@ static int afu_rawdev_selftest(uint16_t dev_id)
>  	}
> 
>  	if (dev->ops && dev->ops->test)
> -		ret = (*dev->ops->test)(dev);
> +		ret = dev->ops->test(dev);
> 
>  	afu_rawdev_unlock(dev);
> 
> @@ -174,7 +174,7 @@ static int afu_rawdev_dump(struct rte_rawdev
> *rawdev, FILE *f)
>  		return -ENODEV;
> 
>  	if (dev->ops && dev->ops->dump)
> -		ret = (*dev->ops->dump)(dev, f);
> +		ret = dev->ops->dump(dev, f);
> 
>  	return ret;
>  }
> @@ -326,7 +326,7 @@ static int afu_rawdev_create(struct rte_afu_device
> *afu_dev, int socket_id)
>  	}
> 
>  	if (dev->ops->init) {
> -		ret = (*dev->ops->init)(dev);
> +		ret = dev->ops->init(dev);
>  		if (ret) {
>  			IFPGA_RAWDEV_PMD_ERR("Failed to init %s",
> name);
>  			goto cleanup;
> --
> 2.47.2
Acked-by: Rosen Xu <rosen.xu@intel.com>

  parent reply	other threads:[~2025-03-12 14:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11 15:51 [PATCH 0/4] more unnecessary function pointer Stephen Hemminger
2025-03-11 15:51 ` [PATCH 1/4] raw/ifpga: remove unnecessary deref of function pointers Stephen Hemminger
2025-03-11 16:03   ` Bruce Richardson
2025-03-12 14:06   ` Xu, Rosen [this message]
2025-03-11 15:51 ` [PATCH 2/4] crypto/ionic: remove unnecessary deref of function pointer Stephen Hemminger
2025-03-11 15:51 ` [PATCH 3/4] regexdev: another unnecessary deref of function pointers Stephen Hemminger
2025-03-11 15:51 ` [PATCH 4/4] vhost: remove " Stephen Hemminger
2025-03-11 16:04 ` [PATCH 0/4] more unnecessary function pointer Bruce Richardson

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=DM4PR11MB7757953C09CF5CC65B0ABFCF89D02@DM4PR11MB7757.namprd11.prod.outlook.com \
    --to=rosen.xu@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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;
as well as URLs for NNTP newsgroup(s).