public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Ohad Ben-Cohen <ohad@wizery.com>,
	linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	Rob Herring <robh@kernel.org>, Christoph Hellwig <hch@lst.de>,
	Stefano Stabellini <stefanos@xilinx.com>,
	Bruce Ashfield <bruce.ashfield@xilinx.com>
Subject: Re: [RFC PATCH 3/7] remoteproc: Remove vdev_to_rvdev and vdev_to_rproc from remoteproc API
Date: Tue, 19 Oct 2021 11:39:15 -0600	[thread overview]
Message-ID: <20211019173915.GA3340362@p14s> (raw)
In-Reply-To: <20211001101234.4247-4-arnaud.pouliquen@foss.st.com>

Good morning,

On Fri, Oct 01, 2021 at 12:12:30PM +0200, Arnaud Pouliquen wrote:
> These both functions are only used by the remoteproc_virtio.

s/"These both functions"/"Both of these functions"

> There is no reason to expose them in the API.
> Move the functions in remoteproc_virtio.c
> 
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
> ---
>  drivers/remoteproc/remoteproc_virtio.c | 12 ++++++++++++
>  include/linux/remoteproc.h             | 12 ------------
>  2 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
> index 5e5a78b3243f..c9eecd2f9fb2 100644
> --- a/drivers/remoteproc/remoteproc_virtio.c
> +++ b/drivers/remoteproc/remoteproc_virtio.c
> @@ -25,6 +25,18 @@
>  
>  #include "remoteproc_internal.h"
>  
> +static struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev)
> +{
> +	return container_of(vdev->dev.parent, struct rproc_vdev, dev);
> +}
> +
> +static  struct rproc *vdev_to_rproc(struct virtio_device *vdev)
> +{
> +	struct rproc_vdev *rvdev = vdev_to_rvdev(vdev);
> +
> +	return rvdev->rproc;
> +}
> +
>  static int copy_dma_range_map(struct device *to, struct device *from)
>  {
>  	const struct bus_dma_region *map = from->dma_range_map, *new_map, *r;
> diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
> index 83c09ac36b13..e0600e1e5c17 100644
> --- a/include/linux/remoteproc.h
> +++ b/include/linux/remoteproc.h
> @@ -684,18 +684,6 @@ int rproc_coredump_add_custom_segment(struct rproc *rproc,
>  				      void *priv);
>  int rproc_coredump_set_elf_info(struct rproc *rproc, u8 class, u16 machine);
>  
> -static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev)
> -{
> -	return container_of(vdev->dev.parent, struct rproc_vdev, dev);
> -}
> -
> -static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev)
> -{
> -	struct rproc_vdev *rvdev = vdev_to_rvdev(vdev);
> -
> -	return rvdev->rproc;
> -}
> -
>  void rproc_add_subdev(struct rproc *rproc, struct rproc_subdev *subdev);
>  
>  void rproc_remove_subdev(struct rproc *rproc, struct rproc_subdev *subdev);
> -- 
> 2.17.1
> 

  parent reply	other threads:[~2021-10-19 17:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 10:12 [RFC PATCH 0/7] remoteproc: restructure the remoteproc VirtIO device Arnaud Pouliquen
2021-10-01 10:12 ` [RFC PATCH 1/7] remoteproc: core: Introduce virtio device add/remove functions Arnaud Pouliquen
2021-10-14 17:48   ` Mathieu Poirier
2021-10-01 10:12 ` [RFC PATCH 2/7] remoteproc: Move rvdev management in rproc_virtio Arnaud Pouliquen
2021-10-22 17:25   ` Mathieu Poirier
2021-10-01 10:12 ` [RFC PATCH 3/7] remoteproc: Remove vdev_to_rvdev and vdev_to_rproc from remoteproc API Arnaud Pouliquen
2021-10-15 17:22   ` (subset) " Bjorn Andersson
2021-10-19 17:39   ` Mathieu Poirier [this message]
2021-10-01 10:12 ` [RFC PATCH 4/7] remoteproc: create the REMOTEPROC_VIRTIO config Arnaud Pouliquen
2021-10-09  3:36   ` Bjorn Andersson
2021-10-11 15:58     ` Arnaud POULIQUEN
2021-10-11 17:23       ` Bjorn Andersson
2021-10-19 17:49   ` Mathieu Poirier
2021-10-01 10:12 ` [RFC PATCH 5/7] remoteproc: virtio: Create platform device for the remoteproc_virtio Arnaud Pouliquen
2021-10-22 17:40   ` Mathieu Poirier
2021-10-22 17:42   ` Mathieu Poirier
2021-10-01 10:12 ` [RFC PATCH 6/7] remoteproc: virtio: Add helper to create platform device Arnaud Pouliquen
2021-10-01 10:12 ` [RFC PATCH 7/7] remoteproc: Instantiate the new remoteproc virtio " Arnaud Pouliquen
2021-10-20 17:27   ` Mathieu Poirier
2021-10-22 17:58   ` Mathieu Poirier
2021-11-03  9:16     ` Arnaud POULIQUEN

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=20211019173915.GA3340362@p14s \
    --to=mathieu.poirier@linaro.org \
    --cc=arnaud.pouliquen@foss.st.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=bruce.ashfield@xilinx.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=ohad@wizery.com \
    --cc=robh@kernel.org \
    --cc=stefanos@xilinx.com \
    /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